diff --git a/Modules/ToFHardware/mitkKinectController.h b/Modules/ToFHardware/mitkKinectController.h index 3c3a40f37e..7cb08b2d4f 100644 --- a/Modules/ToFHardware/mitkKinectController.h +++ b/Modules/ToFHardware/mitkKinectController.h @@ -1,111 +1,110 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Module: $RCSfile$ Language: C++ Date: $Date: 2010-05-27 16:06:53 +0200 (Do, 27 Mai 2010) $ 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 __mitkKinectController_h #define __mitkKinectController_h #include "mitkToFHardwareExports.h" #include "mitkCommon.h" +#include "mitkToFConfig.h" #include "itkObject.h" #include "itkObjectFactory.h" -#ifdef MITK_TOF_USE_KINECT +#ifdef MITK_USE_TOF_KINECT #include #endif namespace mitk { /** * @brief Interface to the Kinect camera * * * @ingroup ToFHardware */ class MITK_TOFHARDWARE_EXPORT KinectController : public itk::Object { public: mitkClassMacro( KinectController , itk::Object ); itkNewMacro( Self ); itkGetConstMacro(CaptureHeight,unsigned int); itkGetConstMacro(CaptureWidth,unsigned int); itkGetConstMacro(UseIR,bool); itkSetMacro(UseIR,bool); /*! \brief opens a connection to the Kinect camera. */ virtual bool OpenCameraConnection(); /*! \brief closes the connection to the camera */ virtual bool CloseCameraConnection(); /*! \brief updates the camera. The update function of the hardware interface is called only when new data is available */ virtual bool UpdateCamera(); /*! \brief acquire new distance data from the Kinect camera \param distances pointer to memory location where distances should be stored */ void GetDistances(float* distances); void GetAmplitudes(float* amplitudes); void GetIntensities(float* intensities); /*! \brief acquire new rgb data from the Kinect camera \parama rgb pointer to memory location where rgb information should be stored */ void GetRgb(unsigned char* rgb); /*! \brief convenience method for faster access to distance and rgb data \param distances pointer to memory location where distances should be stored \param rgb pointer to memory location where rgb information should be stored */ void GetAllData(float* distances, float* amplitudes, unsigned char* rgb); protected: KinectController(); ~KinectController(); bool ErrorText(unsigned int error); - -#ifdef MITK_TOF_USE_KINECT +#ifdef MITK_USE_TOF_KINECT xn::Context m_Context; ///< OpenNI context xn::DepthGenerator m_DepthGenerator; ///< Depth generator to access depth image of kinect xn::ImageGenerator m_ImageGenerator; ///< Image generator to access RGB image of kinect xn::IRGenerator m_IRGenerator; ///< IR generator to access IR image of kinect - //xn::IRGenerator m_IRGenerator; #endif bool m_ConnectionCheck; ///< check if camera is connected or not bool m_UseIR; ///< flag indicating whether IR image is used or not unsigned int m_CaptureWidth; ///< image width unsigned int m_CaptureHeight; ///< image height private: }; } //END mitk namespace #endif diff --git a/Modules/ToFHardware/mitkToFConfig.h.in b/Modules/ToFHardware/mitkToFConfig.h.in index abd6154cd6..3c89f9486a 100644 --- a/Modules/ToFHardware/mitkToFConfig.h.in +++ b/Modules/ToFHardware/mitkToFConfig.h.in @@ -1,15 +1,16 @@ /* mitToFConfig.h this file is generated. Do not change! */ #define MITK_TOF_PMDCAMBOARD_SOURCE_PLUGIN "@MITK_TOF_PMD_CAMBOARD_SOURCE@" #define MITK_TOF_PMDCAMBOARD_PROCESSING_PLUGIN "@MITK_TOF_PMD_CAMBOARD_PROC@" #define MITK_TOF_PMDO3_SOURCE_PLUGIN "@MITK_TOF_PMD_O3D_SOURCE@" #define MITK_TOF_PMDO3_PROCESSING_PLUGIN "@MITK_TOF_PMD_O3D_PROC@" #define MITK_TOF_PMDFILE_SOURCE_PLUGIN "@MITK_TOF_PMD_FILE_SOURCE@" #define MITK_TOF_PMDCAMCUBE_SOURCE_PLUGIN "@MITK_TOF_PMD_CAMCUBE_SOURCE@" #define MITK_TOF_PMDCAMCUBE_PROCESSING_PLUGIN "@MITK_TOF_PMD_CAMCUBE_PROC@" #define MITK_TOF_PLATFORM "@_PLATFORM_STRING@" #define MITK_TOF_DATA_DIR "@MITK_DATA_DIR@/ToF-Data" #define MITK_TOF_CAMERAS "@MITK_TOF_AVAILABLE_CAMERAS@" +#cmakedefine MITK_USE_TOF_KINECT