diff --git a/Modules/IGT/CMakeLists.txt b/Modules/IGT/CMakeLists.txt index 0eb80e17da..944707515d 100644 --- a/Modules/IGT/CMakeLists.txt +++ b/Modules/IGT/CMakeLists.txt @@ -1,35 +1,46 @@ INCLUDE(MITKIGTHardware.cmake) IF(MITK_USE_MICRON_TRACKER) SET(INCLUDE_DIRS_INTERNAL ${INCLUDE_DIRS_INTERNAL} ${MITK_MICRON_TRACKER_INCLUDE_DIR}) SET(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${MITK_MICRON_TRACKER_LIB}) ENDIF(MITK_USE_MICRON_TRACKER) IF(MITK_USE_MICROBIRD_TRACKER) SET(INCLUDE_DIRS_INTERNAL ${INCLUDE_DIRS_INTERNAL} ${MITK_USE_MICROBIRD_TRACKER_INCLUDE_DIR}) SET(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} ${MITK_USE_MICROBIRD_TRACKER_LIB}) ENDIF(MITK_USE_MICROBIRD_TRACKER) MITK_CREATE_MODULE(MitkIGT SUBPROJECTS MITK-IGT INCLUDE_DIRS IGTFilters IGTTrackingDevices IGTToolManagement INTERNAL_INCLUDE_DIRS ${INCLUDE_DIRS_INTERNAL} DEPENDS Mitk tinyxml SceneSerialization ADDITIONAL_LIBS "${ADDITIONAL_LIBS}" ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/ClaronMicron.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/IntuitiveDaVinci.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAurora.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAurora_Dome.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAuroraCompactFG_Dome.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAuroraPlanarFG_Dome.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAuroraTabletopFG_Dome.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIAuroraTabletopFG_Prototype_Dome.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIPolaris.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/NDIPolarisVicra.stl ) +MITK_INSTALL(FILES ${MITK_SOURCE_DIR}/Modules/IGT/IGTTrackingDevices/TrackingVolumeData/StandardVolume.stl ) MITK_CHECK_MODULE(_RESULT MitkIGT) IF(_RESULT) MESSAGE(STATUS "IGTTutorialStep1 won't be built. Missing: ${_RESULT}") ELSE(_RESULT) ## create IGT config CONFIGURE_FILE(mitkIGTConfig.h.in ${PROJECT_BINARY_DIR}/mitkIGTConfig.h @ONLY) # add test programm for serial communication classADD_EXECUTABLE(SerialCommunicationTest IGTTrackingDevices/mitkSerialCommunicationTest.cpp)TARGET_LINK_LIBRARIES(SerialCommunicationTest mitkIGT Mitk tinyxml PocoXML) ADD_SUBDIRECTORY(IGTTutorial) ADD_SUBDIRECTORY(Testing) ENDIF(_RESULT) diff --git a/Modules/IGT/IGTTrackingDevices/mitkClaronInterface.h b/Modules/IGT/IGTTrackingDevices/mitkClaronInterface.h index 5f2e178f14..ef73ca02c8 100644 --- a/Modules/IGT/IGTTrackingDevices/mitkClaronInterface.h +++ b/Modules/IGT/IGTTrackingDevices/mitkClaronInterface.h @@ -1,145 +1,149 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #ifndef MITKCLARONINTERFACE_H_HEADER_INCLUDED_ #define MITKCLARONINTERFACE_H_HEADER_INCLUDED_ #define MTC(func) {int r = func; if (r!=mtOK) printf("MTC error: %s\n",MTLastErrorString()); }; #include #include #include #include "mitkCommon.h" #include #include -typedef int mtHandle; +#ifdef _WIN64 //Defined for applications for Win64. +typedef long mtHandle; +#else +typedef int mtHandle; +#endif namespace mitk { typedef int claronToolHandle; /** Documentation: * \brief An object of this class represents the interface to the MicronTracker. The methods of this class * are calling the c-functions which are provided by the MTC-library. If the MicronTracker is not in * use, which means the CMake-variable "MITK_USE_MICRON_TRACKER" is set to OFF, this class is replaced * by a stub class called "ClaronInterfaceStub". * \ingroup IGT */ class MitkIGT_EXPORT ClaronInterface : public itk::Object { public: mitkClassMacro(ClaronInterface,itk::Object); itkNewMacro(Self); /** * \brief Initialization of claroninterface. * \param calibrationDir The directory where the device can find the camera calibration file. * \param toolFilesDir The directory for the tool files. */ void Initialize(std::string calibrationDir, std::string toolFilesDir); /** * \brief Opens the connection to the device and makes it ready to track tools. * \return Returns true if there is a connection to the device and the device is ready to track tools, false if not. */ bool StartTracking(); /** * \brief Clears all resources. After this method have been called the system isn't ready to track any longer. * \return Returns true if the operation was succesful, false if not. */ bool StopTracking(); /** * \return Returns all tools which have been detected at the last frame grab. */ std::vector GetAllActiveTools(); /** * \return Returns the position of the tooltip. If no tooltip is defined the Method returns the position of the tool. */ std::vector GetTipPosition(claronToolHandle c); /** * \return Returns the quarternions of the tooltip. If no tooltip is defined the Method returns the quarternions of the tool. */ std::vector GetTipQuaternions(claronToolHandle c); /** * \return Returns the position of the tool */ std::vector GetPosition(claronToolHandle c); /** * \return Returns the quaternion of the tool. */ std::vector GetQuaternions(claronToolHandle c); /** * \return Returns the name of the tool. This name is given by the calibration file. * \param c The handle of the tool, which name should be given back. */ const char* GetName(claronToolHandle c); /** * \brief Grabs a frame from the camera. */ void GrabFrame(); /** * \return Returns wether the tracking device is tracking or not. */ bool IsTracking(); /** * \return Returns wether the MicronTracker is installed (means wether the C-Make-Variable "MITK_USE_MICRON_TRACKER" is set ON), * so returns true in this case. This is because the class mitkClaronInterfaceStub, in which the same Method returns false * is used otherways. */ bool IsMicronTrackerInstalled(); protected: /** * \brief standard constructor */ ClaronInterface(); /** * \brief standard destructor */ ~ClaronInterface(); /** \brief Variable is true if the device is tracking at the moment, false if not.*/ bool isTracking; /** \brief Variable which holds the directory which should contain the file BumbleBee_6400420.calib. This directory is needed by the MTC library.*/ char calibrationDir[512]; /** \brief Variable which holds a directory with some tool files in it. All this tools are trackable when the path is given to the MTC library.*/ char markerDir[512]; //Some handles to communicate with the MTC library. mtHandle IdentifiedMarkers; mtHandle PoseXf; mtHandle CurrCamera; mtHandle IdentifyingCamera; //------------------------------------------------ }; }//mitk #endif diff --git a/Modules/IGT/MITKIGTHardware.cmake b/Modules/IGT/MITKIGTHardware.cmake index 155e72e554..463887d2dc 100644 --- a/Modules/IGT/MITKIGTHardware.cmake +++ b/Modules/IGT/MITKIGTHardware.cmake @@ -1,28 +1,31 @@ #Begin MicronTracker Hardware OPTION(MITK_USE_MICRON_TRACKER "Enable support for micron tracker hardware" OFF) # only if MicronTracker is enabled IF(MITK_USE_MICRON_TRACKER) FIND_LIBRARY(MITK_MICRON_TRACKER_LIB MTC DOC "Path which contains the MT2 library.") GET_FILENAME_COMPONENT(MICRON_TRACKER_SDK_DIR ${MITK_MICRON_TRACKER_LIB} PATH) FIND_PATH(MITK_MICRON_TRACKER_INCLUDE_DIR MTC.h ${MICRON_TRACKER_SDK_DIR} DOC "Include directory of the MT2.") FIND_PATH(MITK_MICRON_TRACKER_TEMP_DIR . DOC "Any temporary directory which can be used by the MicronTracker2.") FIND_PATH(MITK_MICRON_TRACKER_CALIBRATION_DIR BumbleBee_6400420.calib DOC "Path which contains the MT2 calibration file.") + MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/MTC.dll CONFIGURATIONS Release) + MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/MTInterfaceDotNet.dll CONFIGURATIONS Release) + MITK_INSTALL(FILES ${MICRON_TRACKER_SDK_DIR}/PGRFlyCapture.dll CONFIGURATIONS Release) ENDIF(MITK_USE_MICRON_TRACKER) #End MicronTracker Hardware # only on Win32 IF(WIN32) - + #Begin Ascension MicroBird Hardware OPTION(MITK_USE_MICROBIRD_TRACKER "Enable support for Ascension MicroBird tracker hardware" OFF) IF(MITK_USE_MICROBIRD_TRACKER) ADD_DEFINITIONS(-DMITK_USE_MICROBIRD_TRACKER) FIND_LIBRARY(MITK_USE_MICROBIRD_TRACKER_LIB PCIBird3) GET_FILENAME_COMPONENT(MICROBIRD_TRACKER_API_DIR ${MITK_USE_MICROBIRD_TRACKER_LIB} PATH) FIND_PATH(MITK_USE_MICROBIRD_TRACKER_INCLUDE_DIR PCIBird3.h ${MICROBIRD_TRACKER_API_DIR}) ENDIF(MITK_USE_MICROBIRD_TRACKER) #End MicroBird Hardware -ENDIF(WIN32) +ENDIF(WIN32) \ No newline at end of file