diff --git a/Modules/ToFHardware/Kinect/mitkKinectDeviceFactory.h b/Modules/ToFHardware/Kinect/mitkKinectDeviceFactory.h index ad03cd1a5c..56fe9c5de2 100644 --- a/Modules/ToFHardware/Kinect/mitkKinectDeviceFactory.h +++ b/Modules/ToFHardware/Kinect/mitkKinectDeviceFactory.h @@ -1,68 +1,76 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkKinectDeviceFactory_h #define __mitkKinectDeviceFactory_h #include "mitkKinectModuleExports.h" #include "mitkKinectDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief KinectDeviceFactory is an implementation of the factory pattern to generate Microsoft Kinect devices. * KinectDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new KinectDevices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_KINECTMODULE_EXPORT KinectDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: KinectDeviceFactory() { - this->m_DeviceNumber = 0; + this->m_DeviceNumber = 1; } /*! \brief Defining the Factorie´s Name, here for the Kinect. */ std::string GetFactoryName() { return std::string("Kinect Factory"); } //Interating the Device name on calling the Factory std::string GetCurrentDeviceName() { std::stringstream name; - name << "Kinect Device " << m_DeviceNumber++; + if (m_DeviceNumber>1) + { + name << "Kinect " << m_DeviceNumber; + } + else + { + name << "Kinect "; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a KinectDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { KinectDevice::Pointer device = KinectDevice::New(); return device.GetPointer(); } //Member variable as variable for our DeviceNumber int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/MesaSR4000/mitkToFCameraMESASR4000DeviceFactory.h b/Modules/ToFHardware/MesaSR4000/mitkToFCameraMESASR4000DeviceFactory.h index 006e355605..2ffb116ed1 100644 --- a/Modules/ToFHardware/MesaSR4000/mitkToFCameraMESASR4000DeviceFactory.h +++ b/Modules/ToFHardware/MesaSR4000/mitkToFCameraMESASR4000DeviceFactory.h @@ -1,66 +1,74 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraMESASR4000DeviceFactory_h #define __mitkToFCameraMESASR4000DeviceFactory_h #include "mitkMESASR4000ModuleExports.h" #include "mitkToFCameraMESASR4000Device.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPMDRawPlayerDeviceFactory is an implementation of the factory pattern to generate MESASR4000Devices. * ToFCameraMESASR4000DeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new Raw Player Devices via a global instance of this factory. * @ingroup ToFHardware */ -class MITK_MESASR4000MODULE_EXPORT ToFCameraMESASR4000DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { + class MITK_MESASR4000MODULE_EXPORT ToFCameraMESASR4000DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { -public: + public: ToFCameraMESASR4000DeviceFactory() { - this->m_DeviceNumber = 0; + this->m_DeviceNumber = 1; } - /*! - \brief Defining the Factorie´s Name, here for the MESASR4000DeviceFactory - */ - std::string GetFactoryName() - { - return std::string("MESA SR4000 Factory"); - } - std::string GetCurrentDeviceName() + /*! + \brief Defining the Factorie´s Name, here for the MESASR4000DeviceFactory + */ + std::string GetFactoryName() + { + return std::string("MESA SR4000 Factory"); + } + std::string GetCurrentDeviceName() { std::stringstream name; - name << "Mesa SR4000 Device " << m_DeviceNumber++; + if(m_DeviceNumber>1) + { + name << "MESA SR4000 "<< m_DeviceNumber; + } + else + { + name << "MESA SR4000"; + } + m_DeviceNumber++; return name.str(); } -private: - /*! - \brief Create an instance of a ToFPMDRawDataDevice. - */ - ToFCameraDevice::Pointer createToFCameraDevice() - { - ToFCameraMESASR4000Device::Pointer device = ToFCameraMESASR4000Device::New(); + private: + /*! + \brief Create an instance of a ToFPMDRawDataDevice. + */ + ToFCameraDevice::Pointer createToFCameraDevice() + { + ToFCameraMESASR4000Device::Pointer device = ToFCameraMESASR4000Device::New(); - return device.GetPointer(); - } + return device.GetPointer(); + } int m_DeviceNumber; -}; + }; } #endif diff --git a/Modules/ToFHardware/PMD/mitkToFCameraPMDCamBoardDeviceFactory.h b/Modules/ToFHardware/PMD/mitkToFCameraPMDCamBoardDeviceFactory.h index dcd4bc3109..e31a04a17b 100644 --- a/Modules/ToFHardware/PMD/mitkToFCameraPMDCamBoardDeviceFactory.h +++ b/Modules/ToFHardware/PMD/mitkToFCameraPMDCamBoardDeviceFactory.h @@ -1,68 +1,76 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDCamBoardDeviceFactory_h #define __mitkToFCameraPMDCamBoardDeviceFactory_h #include "mitkPMDModuleExports.h" #include "mitkToFCameraPMDCamBoardDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPMDCamBoardDeviceFactory is an implementation of the factory pattern to generate CamBoard devices. * ToFPMDCamBoardDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new CamBoard Devices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_PMDMODULE_EXPORT ToFCameraPMDCamBoardDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraPMDCamBoardDeviceFactory() { - this->m_DeviceNumber=0; + this->m_DeviceNumber=1; } /*! \brief Defining the Factorie´s Name, here for the ToFPMDCamBoard. */ std::string GetFactoryName() { return std::string("PMD CamBoard Factory "); } std::string GetCurrentDeviceName() { std::stringstream name; - name << "PMD CamBoard Device " << m_DeviceNumber++; - return name.str(); + if(m_DeviceNumber>1) + { + name << "PMD CamBoard "<< m_DeviceNumber; + } + else + { + name << "PMD CamBoard"; + } + m_DeviceNumber++; + return name.str(); } private: /*! \brief Create an instance of a ToFPMDCamBoardDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraPMDCamBoardDevice::Pointer device = ToFCameraPMDCamBoardDevice::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/PMD/mitkToFCameraPMDCamCubeDeviceFactory.h b/Modules/ToFHardware/PMD/mitkToFCameraPMDCamCubeDeviceFactory.h index d5986ea672..89e494a407 100644 --- a/Modules/ToFHardware/PMD/mitkToFCameraPMDCamCubeDeviceFactory.h +++ b/Modules/ToFHardware/PMD/mitkToFCameraPMDCamCubeDeviceFactory.h @@ -1,67 +1,75 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDCamCubeDeviceFactory_h #define __mitkToFCameraPMDCamCubeDeviceFactory_h #include "mitkPMDModuleExports.h" #include "mitkToFCameraPMDCamCubeDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPMDCamBoardDeviceFactory is an implementation of the factory pattern to generate Cam Cube Devices. * ToFPMDCamCubeDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new Cam Cube Devices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_PMDMODULE_EXPORT ToFCameraPMDCamCubeDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraPMDCamCubeDeviceFactory() { - this->m_DeviceNumber=0; + this->m_DeviceNumber=1; } /*! \brief Defining the Factorie´s Name, here for the ToFPMDCamCube. */ std::string GetFactoryName() { return std::string("PMD Camcube 2.0/3.0 Factory "); } std::string GetCurrentDeviceName() { std::stringstream name; - name << "PMD CamCube 2.0/3.0 Device "<< m_DeviceNumber++; + if(m_DeviceNumber>1) + { + name << "PMD CamCube 2.0/3.0 "<< m_DeviceNumber; + } + else + { + name << "PMD CamCube 2.0/3.0 "; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a ToFPMDCamCubeDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraPMDCamCubeDevice::Pointer device = ToFCameraPMDCamCubeDevice::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/PMD/mitkToFCameraPMDO3DeviceFactory.h b/Modules/ToFHardware/PMD/mitkToFCameraPMDO3DeviceFactory.h index 2c23522e2e..6ddf17ac2d 100644 --- a/Modules/ToFHardware/PMD/mitkToFCameraPMDO3DeviceFactory.h +++ b/Modules/ToFHardware/PMD/mitkToFCameraPMDO3DeviceFactory.h @@ -1,67 +1,75 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDO3DeviceFactory_h #define __mitkToFCameraPMDO3DeviceFactory_h #include "mitkPMDModuleExports.h" #include "mitkToFCameraPMDO3Device.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFCameraPMDO3DeviceFactory is an implementation of the factory pattern to generate Do3 Devices. * ToFPMDCamCubeDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new Cam Cube Devices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_PMDMODULE_EXPORT ToFCameraPMDO3DeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraPMDO3DeviceFactory() { - this->m_DeviceNumber =0; + this->m_DeviceNumber =1; } /*! \brief Defining the Factorie´s Name, here for the ToFPMDO3Device */ std::string GetFactoryName() { return std::string("PMD O3D Factory"); } std::string GetCurrentDeviceName() { std::stringstream name; - name<<"PMD O3D Device "<< m_DeviceNumber++; + if(m_DeviceNumber>1) + { + name << "PMD O3 "<< m_DeviceNumber; + } + else + { + name << "PMD O3"; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a ToFPMDO3DeviceFactory. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraPMDO3Device::Pointer device = ToFCameraPMDO3Device::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/PMD/mitkToFCameraPMDPlayerDeviceFactory.h b/Modules/ToFHardware/PMD/mitkToFCameraPMDPlayerDeviceFactory.h index 8c4b2cec5f..f3f7374b2d 100644 --- a/Modules/ToFHardware/PMD/mitkToFCameraPMDPlayerDeviceFactory.h +++ b/Modules/ToFHardware/PMD/mitkToFCameraPMDPlayerDeviceFactory.h @@ -1,68 +1,76 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDPlayerDeviceFactory_h #define __mitkToFCameraPMDPlayerDeviceFactory_h #include "mitkPMDModuleExports.h" #include "mitkToFCameraPMDPlayerDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPMDPlayerDeviceFactory is an implementation of the factory pattern to generate PMD Player Devices. * ToFPMDPlayerDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new PMD Player Devices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_PMDMODULE_EXPORT ToFCameraPMDPlayerDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraPMDPlayerDeviceFactory() { - this->m_DeviceNumber=0; + this->m_DeviceNumber=1; } /*! \brief Defining the Factorie´s Name, here for the ToFPMDPlayer. */ std::string GetFactoryName() { return std::string("PMD Player Factory"); } std::string GetCurrentDeviceName() { std::stringstream name; - name<<"PMD Player Device " << m_DeviceNumber++; + if(m_DeviceNumber>1) + { + name << "PMD Player "<< m_DeviceNumber; + } + else + { + name << "PMD Player"; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a ToFPMDPlayerDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraPMDPlayerDevice::Pointer device = ToFCameraPMDPlayerDevice::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/PMD/mitkToFCameraPMDRawDataCamCubeDeviceFactory.h b/Modules/ToFHardware/PMD/mitkToFCameraPMDRawDataCamCubeDeviceFactory.h index a1ad7600a3..91b9106a7e 100644 --- a/Modules/ToFHardware/PMD/mitkToFCameraPMDRawDataCamCubeDeviceFactory.h +++ b/Modules/ToFHardware/PMD/mitkToFCameraPMDRawDataCamCubeDeviceFactory.h @@ -1,67 +1,75 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraPMDRawDataCamCubeDeviceFactory_h #define __mitkToFCameraPMDRawDataCamCubeDeviceFactory_h #include "mitkPMDModuleExports.h" #include "mitkToFCameraPMDRawDataCamCubeDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPMDRawPlayerDeviceFactory is an implementation of the factory pattern to generate Raw Player Devices. * ToFPMDRawPlayerDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new Raw Player Devices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_PMDMODULE_EXPORT ToFCameraPMDRawDataCamCubeDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraPMDRawDataCamCubeDeviceFactory() { - this->m_DeviceNumber = 0; + this->m_DeviceNumber = 1; } /*! \brief Defining the Factorie´s Name, here for the RawDataDeviceFactory. */ std::string GetFactoryName() { return std::string("PMD RAW Data Camcube Factory "); } std::string GetCurrentDeviceName() { std::stringstream name; - name << "PMD Raw Data CamCube Device "<< m_DeviceNumber++; + if(m_DeviceNumber>1) + { + name << "PMD Raw Data CamCube 2.0/3.0 "<< m_DeviceNumber; + } + else + { + name << "PMD Raw Data CamCube 2.0/3.0"; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a ToFPMDRawDataDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraPMDRawDataCamCubeDevice::Pointer device = ToFCameraPMDRawDataCamCubeDevice::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif diff --git a/Modules/ToFHardware/mitkToFCameraMITKPlayerDeviceFactory.h b/Modules/ToFHardware/mitkToFCameraMITKPlayerDeviceFactory.h index 478a1875eb..24a4c2e83b 100644 --- a/Modules/ToFHardware/mitkToFCameraMITKPlayerDeviceFactory.h +++ b/Modules/ToFHardware/mitkToFCameraMITKPlayerDeviceFactory.h @@ -1,73 +1,80 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __mitkToFCameraMITKPlayerDeviceFactory_h #define __mitkToFCameraMITKPlayerDeviceFactory_h #include "mitkToFHardwareExports.h" #include "mitkToFCameraMITKPlayerDevice.h" #include "mitkAbstractToFDeviceFactory.h" namespace mitk { /** * \brief ToFPlayerDeviceFactory is an implementation of the factory pattern to generate ToFPlayer devices. * ToFPlayerDeviceFactory inherits from AbstractToFDeviceFactory which is a MicroService interface. * This offers users the oppertunity to generate new ToFPlayerDevices via a global instance of this factory. * @ingroup ToFHardware */ class MITK_TOFHARDWARE_EXPORT ToFCameraMITKPlayerDeviceFactory : public itk::LightObject, public AbstractToFDeviceFactory { public: ToFCameraMITKPlayerDeviceFactory() { - m_DeviceNumber = 0; + m_DeviceNumber = 1; } /*! \brief Defining the Factorie´s Name, here for the ToFPlayer. */ std::string GetFactoryName() { return std::string("MITK Player Factory"); } std::string GetCurrentDeviceName() { std::stringstream name; - name << "MITK Player Device " << m_DeviceNumber++; - MITK_INFO << name.str(); // Can be deleted later on! Just gave feedback, while ServiceListWidget has not been initialized + if(m_DeviceNumber>1) + { + name << "MITK Player "<< m_DeviceNumber; + } + else + { + name << "MITK Player"; + } + m_DeviceNumber++; return name.str(); } private: /*! \brief Create an instance of a ToFPlayerDevice. */ ToFCameraDevice::Pointer createToFCameraDevice() { ToFCameraMITKPlayerDevice::Pointer device = ToFCameraMITKPlayerDevice::New(); return device.GetPointer(); } int m_DeviceNumber; }; } #endif