diff --git a/Modules/US/Testing/mitkUSPipelineTest.cpp b/Modules/US/Testing/mitkUSPipelineTest.cpp index ac70ecb116..40fab40566 100644 --- a/Modules/US/Testing/mitkUSPipelineTest.cpp +++ b/Modules/US/Testing/mitkUSPipelineTest.cpp @@ -1,57 +1,57 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2008-02-25 17:27:17 +0100 (Mo, 25 Feb 2008) $ Version: $Revision: 7837 $ 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. =========================================================================*/ #include "mitkUSVideoDevice.h" #include "mitkTestingMacros.h" class mitkUSPipelineTestClass { public: // Anm: Implementierung der einzelnen Testmethoden static void TestInstantiation() { // Set up a pipeline mitk::USVideoDevice::Pointer videoDevice = mitk::USVideoDevice::New("C:\\Users\\maerz\\Videos\\Debut\\us.avi", "Manufacturer", "Model"); MITK_TEST_CONDITION_REQUIRED(videoDevice.IsNotNull(), "videoDevice should not be null after instantiation"); - videoDevice->GenerateData(); + videoDevice->Update(); mitk::USImage::Pointer result = videoDevice->GetOutput(0); MITK_TEST_CONDITION_REQUIRED(result.IsNotNull(), "resulting images should not be null"); - MITK_TEST_CONDITION_REQUIRED(result->GetMetadata()->GetDeviceModel().compare("Model") == 0 , "resulting images should have their metadata Set correctly"); + MITK_TEST_CONDITION_REQUIRED(result->GetMetadata()->GetDeviceModel().compare("Model") == 0 , "resulting images should have their metadata set correctly"); } }; /** * This function is setting up a pipeline and checks the output for validity. */ int mitkUSPipelineTest(int /* argc */, char* /*argv*/[]) { MITK_TEST_BEGIN("mitkUSPipelineTest"); mitkUSPipelineTestClass::TestInstantiation(); MITK_TEST_END(); } \ No newline at end of file diff --git a/Modules/US/USFilters/mitkUSDevice.h b/Modules/US/USFilters/mitkUSDevice.h index 0911af6a6e..163f155958 100644 --- a/Modules/US/USFilters/mitkUSDevice.h +++ b/Modules/US/USFilters/mitkUSDevice.h @@ -1,148 +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 MITKUSDevice_H_HEADER_INCLUDED_ #define MITKUSDevice_H_HEADER_INCLUDED_ #include #include "mitkUSProbe.h" #include "mitkUSImageMetadata.h" #include "mitkUSImage.h" #include #include #include #include namespace mitk { /**Documentation * \brief A device holds information about it's model, make and the connected probes. It is the - * common superclass for all Devices and acts as an image source for mitk Images as well as openCV Images. - * if one of these functionalities is not supported by a subclass, it will throw an unsupported Operation Exception. + * common superclass for all Devices and acts as an image source for mitkUSImages. It is the Base class + * for all US Devices, and every new device should extend it. * \ingroup US */ class MitkUS_EXPORT USDevice : public mitk::ImageSource { public: mitkClassMacro(USDevice, mitk::ImageSource); + // Expects a manufacturer, a model and a flag wheter this is a video-only device or not mitkNewMacro3Param(Self, std::string, std::string, bool); /** * \brief Add a probe to the device without connecting to it. * This should usually be done before connecting to the probe */ virtual void AddProbe(mitk::USProbe::Pointer probe); /** * \brief Connect to a probe and activate it. The probe should be added first. * Usually, a VideoDevice will just add a probe it want's to connect to, * but an SDK Device might require adding a probe first. */ virtual void ActivateProbe(mitk::USProbe::Pointer probe); /** * \brief Deactivates the currently active probe. */ virtual void DeactivateProbe(); /** * \brief Removes a probe from the ist of currently added probes. */ //virtual void removeProbe(mitk::USProbe::Pointer probe); std::vector GetConnectedProbes(); - /** - *\brief Grabs the next frame from the Video input - */ - void GenerateData(); + /** + *\brief Grabs the next frame from the Video input + */ + void GenerateData(); - /** - *\brief return the output (output with id 0) of the filter - */ - USImage* GetOutput(void); + /** + *\brief return the output (output with id 0) of the filter + */ + USImage* GetOutput(void); - /** - *\brief return the output with id idx of the filter - */ - USImage* GetOutput(unsigned int idx); + /** + *\brief return the output with id idx of the filter + */ + USImage* GetOutput(unsigned int idx); - /** - *\brief Graft the specified DataObject onto this ProcessObject's output. - * - * See itk::ImageSource::GraftNthOutput for details - */ - virtual void GraftNthOutput(unsigned int idx, itk::DataObject *graft); + /** + *\brief Graft the specified DataObject onto this ProcessObject's output. + * + * See itk::ImageSource::GraftNthOutput for details + */ + virtual void GraftNthOutput(unsigned int idx, itk::DataObject *graft); - /** - * \brief Graft the specified DataObject onto this ProcessObject's output. - * - * See itk::ImageSource::Graft Output for details - */ - virtual void GraftOutput(itk::DataObject *graft); - - /** - * \brief Make a DataObject of the correct type to used as the specified output. - * - * This method is automatically called when DataObject::DisconnectPipeline() - * is called. DataObject::DisconnectPipeline, disconnects a data object - * from being an output of its current source. When the data object - * is disconnected, the ProcessObject needs to construct a replacement - * output data object so that the ProcessObject is in a valid state. - * Subclasses of USImageVideoSource that have outputs of different - * data types must overwrite this method so that proper output objects - * are created. - */ - virtual DataObjectPointer MakeOutput(unsigned int idx); + /** + * \brief Graft the specified DataObject onto this ProcessObject's output. + * + * See itk::ImageSource::Graft Output for details + */ + virtual void GraftOutput(itk::DataObject *graft); + + /** + * \brief Make a DataObject of the correct type to used as the specified output. + * + * This method is automatically called when DataObject::DisconnectPipeline() + * is called. DataObject::DisconnectPipeline, disconnects a data object + * from being an output of its current source. When the data object + * is disconnected, the ProcessObject needs to construct a replacement + * output data object so that the ProcessObject is in a valid state. + * Subclasses of USImageVideoSource that have outputs of different + * data types must overwrite this method so that proper output objects + * are created. + */ + virtual DataObjectPointer MakeOutput(unsigned int idx); //########### GETTER & SETTER ##################// itkGetMacro(ActiveProbe, mitk::USProbe::Pointer); std::string GetDeviceManufacturer(); std::string GetDeviceModel(); std::string GetDeviceComment(); bool GetIsVideoOnly(); protected: mitk::USProbe::Pointer m_ActiveProbe; std::vector m_ConnectedProbes; /** * \brief This metadata set is privately used to imprint Images with Metadata later. * At instantiation time, it only contains Information about the Device, At scan time, it integrates this data with the probe information and imprints it on the produced images. This field is intentionally hidden from outside interference. */ mitk::USImageMetadata::Pointer m_Metadata; /** * \brief Enforces minimal Metadata to be set. The isVideoOnly flag indicates that this class * only handles a videostream and does not recieve Metadata from the physical device itself. */ USDevice(std::string manufacturer, std::string model, bool isVideoOnly); virtual ~USDevice(); }; } // namespace mitk #endif \ No newline at end of file diff --git a/Modules/US/USFilters/mitkUSImage.cpp b/Modules/US/USFilters/mitkUSImage.cpp index 200dde29d5..ee08c7688f 100644 --- a/Modules/US/USFilters/mitkUSImage.cpp +++ b/Modules/US/USFilters/mitkUSImage.cpp @@ -1,63 +1,64 @@ /*========================================================================= 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. =========================================================================*/ #include "mitkUSImage.h" #include #include mitk::USImage::USImage() : mitk::Image() { } mitk::USImage::USImage(mitk::Image::Pointer image) : mitk::Image() { this->Initialize(image); this->SetVolume(image->GetData()); + this->SetMetadata(mitk::USImageMetadata::New()); } mitk::USImage::~USImage() { - + this->SetMetadata(mitk::USImageMetadata::New()); } mitk::USImageMetadata::Pointer mitk::USImage::GetMetadata(){ mitk::USImageMetadata::Pointer result = mitk::USImageMetadata::New(); result->SetDeviceManufacturer(this->GetProperty(mitk::USImageMetadata::PROP_DEV_MANUFACTURER)->GetValueAsString()); result->SetDeviceModel( this->GetProperty(mitk::USImageMetadata::PROP_DEV_MODEL)->GetValueAsString()); result->SetDeviceComment( this->GetProperty(mitk::USImageMetadata::PROP_DEV_COMMENT)->GetValueAsString()); result->SetDeviceIsVideoOnly( this->GetProperty(mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY)); result->SetProbeName( this->GetProperty(mitk::USImageMetadata::PROP_PROBE_NAME)->GetValueAsString()); result->SetProbeFrequency( this->GetProperty(mitk::USImageMetadata::PROP_PROBE_FREQUENCY)->GetValueAsString()); result->SetZoom( this->GetProperty(mitk::USImageMetadata::PROP_ZOOM)->GetValueAsString()); - return result; } void mitk::USImage::SetMetadata(mitk::USImageMetadata::Pointer metadata){ this->SetProperty(mitk::USImageMetadata::PROP_DEV_MANUFACTURER, mitk::StringProperty::New(metadata->GetDeviceManufacturer())); this->SetProperty(mitk::USImageMetadata::PROP_DEV_MODEL, mitk::StringProperty::New(metadata->GetDeviceModel())); this->SetProperty(mitk::USImageMetadata::PROP_DEV_COMMENT, mitk::StringProperty::New(metadata->GetDeviceComment())); this->SetProperty(mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY, mitk::BoolProperty::New(metadata->GetDeviceIsVideoOnly())); this->SetProperty(mitk::USImageMetadata::PROP_PROBE_NAME, mitk::StringProperty::New(metadata->GetProbeName())); this->SetProperty(mitk::USImageMetadata::PROP_PROBE_FREQUENCY, mitk::StringProperty::New(metadata->GetProbeFrequency())); this->SetProperty(mitk::USImageMetadata::PROP_ZOOM, mitk::StringProperty::New(metadata->GetZoom())); -} \ No newline at end of file +} + diff --git a/Modules/US/USFilters/mitkUSImage.h b/Modules/US/USFilters/mitkUSImage.h index 23360b968e..a8871ff420 100644 --- a/Modules/US/USFilters/mitkUSImage.h +++ b/Modules/US/USFilters/mitkUSImage.h @@ -1,63 +1,67 @@ /*========================================================================= 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 MITKUSIMAGE_H_HEADER_INCLUDED_ #define MITKUSIMAGE_H_HEADER_INCLUDED_ #include #include #include #include "mitkUSImageMetadata.h" namespace mitk { /**Documentation * \brief This specialization of mitk::Image only appends necessary Metadata to an MITK image. Otherwise it can safely be treated like it's mother class. + * to generate a USImage from an standard mitk:Image, call the appropriate constructor USImage( *image) * \ingroup US */ class MitkUS_EXPORT USImage : public mitk::Image { public: mitkClassMacro(USImage, mitk::Image); itkNewMacro(Self); // Macro to create an mitkUSImage from an mitkImage mitkNewMacro1Param(Self, mitk::Image::Pointer); /** * \brief reads out this image's Metadata set from the properties and returns a corresponding USImageMetadata object. */ mitk::USImageMetadata::Pointer GetMetadata(); /** * \brief writes the information of the metadata object into the image's properties. */ void SetMetadata(mitk::USImageMetadata::Pointer metadata); protected: + /** + * \brief this constructor creates an empty USImage. The Metadata are set to default. + */ USImage(); /** * \brief this constructor creates an US Image identical to the recieved mitkImage. The Metadata are set to default. */ USImage(mitk::Image::Pointer image); - virtual ~USImage(); + virtual ~USImage(); }; } // namespace mitk #endif \ No newline at end of file diff --git a/Modules/US/USFilters/mitkUSImageMetadata.cpp b/Modules/US/USFilters/mitkUSImageMetadata.cpp index 389b66dccd..a17b9e22ac 100644 --- a/Modules/US/USFilters/mitkUSImageMetadata.cpp +++ b/Modules/US/USFilters/mitkUSImageMetadata.cpp @@ -1,38 +1,46 @@ /*========================================================================= 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. =========================================================================*/ #include "mitkUSImageMetadata.h" const char* mitk::USImageMetadata::PROP_DEV_MANUFACTURER = "US_Device_Manufacturer"; const char* mitk::USImageMetadata::PROP_DEV_MODEL = "US_Device_Model"; const char* mitk::USImageMetadata::PROP_DEV_COMMENT = "US_Device_Comment"; const char* mitk::USImageMetadata::PROP_DEV_ISVIDEOONLY = "US_Device_VideoOnly"; const char* mitk::USImageMetadata::PROP_PROBE_NAME = "US_Probe_Name"; const char* mitk::USImageMetadata::PROP_PROBE_FREQUENCY = "US_Probe_Frequency"; const char* mitk::USImageMetadata::PROP_ZOOM = "US_Zoom_Factor"; mitk::USImageMetadata::USImageMetadata() : itk::Object() { - + // Set Default Values + this->SetDeviceComment("None"); + this->SetDeviceIsVideoOnly(true); + this->SetDeviceManufacturer("Unknown Manufacturer"); + this->SetDeviceModel("Unknown Model"); + this->SetProbeFrequency("Unknown Frequency"); + this->SetProbeName("Unknown Probe"); + this->SetZoom("Unknown Zoom Factor"); } mitk::USImageMetadata::~USImageMetadata() { -} \ No newline at end of file +} + diff --git a/Modules/US/USFilters/mitkUSImageMetadata.h b/Modules/US/USFilters/mitkUSImageMetadata.h index a97fcee484..164278cffa 100644 --- a/Modules/US/USFilters/mitkUSImageMetadata.h +++ b/Modules/US/USFilters/mitkUSImageMetadata.h @@ -1,85 +1,89 @@ /*========================================================================= 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 MITKUSIMAGEMETADATA_H_HEADER_INCLUDED_ #define MITKUSIMAGEMETADATA_H_HEADER_INCLUDED_ #include #include #include #include namespace mitk { /**Documentation - * \brief TODO + * \brief This class encapsulates all necessary metadata to describe a US Image. * \ingroup US */ class MitkUS_EXPORT USImageMetadata : public itk::Object { public: mitkClassMacro(USImageMetadata, itk::Object); itkNewMacro(Self); + //## getter and setter ## itkGetMacro(DeviceManufacturer, std::string); itkSetMacro(DeviceManufacturer, std::string); itkGetMacro(DeviceModel, std::string); itkSetMacro(DeviceModel, std::string); itkGetMacro(DeviceComment, std::string); itkSetMacro(DeviceComment, std::string); itkGetMacro(ProbeName, std::string); itkSetMacro(ProbeName, std::string); itkGetMacro(ProbeFrequency, std::string); itkSetMacro(ProbeFrequency, std::string); itkGetMacro(Zoom, std::string); itkSetMacro(Zoom, std::string); itkGetMacro(DeviceIsVideoOnly, bool); itkSetMacro(DeviceIsVideoOnly, bool); // The following constants define how metadata is written to and read from an mitk image // when defining new properties, add them here, define them in the cpp, and add them to // USImage's getMetadata and setMetadata methods as well static const char* PROP_DEV_MANUFACTURER; static const char* PROP_DEV_MODEL; static const char* PROP_DEV_COMMENT; static const char* PROP_DEV_ISVIDEOONLY; static const char* PROP_PROBE_NAME; static const char* PROP_PROBE_FREQUENCY; static const char* PROP_ZOOM; protected: + /** + * \brief Creates a new Metadata with all fields set to default values. + */ USImageMetadata(); virtual ~USImageMetadata(); std::string m_DeviceManufacturer; std::string m_DeviceModel; std::string m_DeviceComment; std::string m_ProbeName; std::string m_ProbeFrequency; std::string m_Zoom; bool m_DeviceIsVideoOnly; }; } // namespace mitk #endif \ No newline at end of file diff --git a/Modules/US/USFilters/mitkUSImageVideoSource.cpp b/Modules/US/USFilters/mitkUSImageVideoSource.cpp index a5e1ef2326..331b5a882f 100644 --- a/Modules/US/USFilters/mitkUSImageVideoSource.cpp +++ b/Modules/US/USFilters/mitkUSImageVideoSource.cpp @@ -1,82 +1,81 @@ /*========================================================================= 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. =========================================================================*/ #include "mitkUSImageVideoSource.h" #include "mitkImage.h" #include mitk::USImageVideoSource::USImageVideoSource() : itk::Object() { m_IsVideoReady = false; m_IsMetadataReady = false; m_IsGeometryReady = false; this->m_OpenCVToMitkFilter = mitk::OpenCVToMitkImageFilter::New(); } mitk::USImageVideoSource::~USImageVideoSource() { } - void mitk::USImageVideoSource::SetVideoFileInput(std::string path) { m_OpenCVVideoSource = mitk::OpenCVVideoSource::New(); // Example: "C:\\Users\\maerz\\Videos\\Debut\\us.avi" m_OpenCVVideoSource->SetVideoFileInput(path.c_str(),true,false); m_OpenCVVideoSource->StartCapturing(); m_OpenCVVideoSource->FetchFrame(); // Let's see if we have been successful m_IsVideoReady = m_OpenCVVideoSource->IsCapturingEnabled(); } void mitk::USImageVideoSource::SetCameraInput(int deviceID){ m_OpenCVVideoSource->SetVideoCameraInput(deviceID); m_OpenCVVideoSource->StartCapturing(); m_OpenCVVideoSource->FetchFrame(); // Let's see if we have been successful m_IsVideoReady = m_OpenCVVideoSource->IsCapturingEnabled(); } mitk::USImage::Pointer mitk::USImageVideoSource::GetNextImage(){ mitk::USImage::Pointer result; mitk::Image::Pointer normalImage; IplImage* iplImage = cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,3); m_OpenCVVideoSource->GetCurrentFrameAsOpenCVImage(iplImage); this->m_OpenCVToMitkFilter->SetOpenCVImage(iplImage); this->m_OpenCVToMitkFilter->Update(); normalImage = this->m_OpenCVToMitkFilter->GetOutput(0); result = mitk::USImage::New(normalImage); cvReleaseImage (&iplImage); return result; } diff --git a/Modules/US/USFilters/mitkUSImageVideoSource.h b/Modules/US/USFilters/mitkUSImageVideoSource.h index 056887ed6d..2cf1f8942d 100644 --- a/Modules/US/USFilters/mitkUSImageVideoSource.h +++ b/Modules/US/USFilters/mitkUSImageVideoSource.h @@ -1,84 +1,88 @@ /*========================================================================= 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 MITKUSImageVideoSource_H_HEADER_INCLUDED_ #define MITKUSImageVideoSource_H_HEADER_INCLUDED_ #include #include "mitkUSImage.h" #include "mitkOpenCVVideoSource.h" #include "mitkOpenCVToMitkImageFilter.h" namespace mitk { /**Documentation - * \brief TODO + * \brief This class can be pointed to a video file or a videodevice and delivers USImages with default metadata Sets * * \ingroup US */ class MitkUS_EXPORT USImageVideoSource : public itk::Object { public: mitkClassMacro(USImageVideoSource, itk::ProcessObject); itkNewMacro(Self); /** *\brief Opens a video file for streaming. If nothing goes wrong, the * VideoSource is ready to deliver images after calling this function. */ void SetVideoFileInput(std::string path); /** *\brief Opens a video device for streaming. Takes the Device id. Try -1 for "grab the first you can get" * which works quite well if only one device is available. If nothing goes wrong, the * VideoSource is ready to deliver images after calling this function. */ void SetCameraInput(int deviceID); + /** + *\brief Retrieves the next frame. This will typically be the next frame in a file + * or the last cahced file in a devcie. + */ mitk::USImage::Pointer GetNextImage(); // Getter & Setter itkGetMacro(OpenCVVideoSource, mitk::OpenCVVideoSource::Pointer); itkSetMacro(OpenCVVideoSource, mitk::OpenCVVideoSource::Pointer); itkGetMacro(IsVideoReady, bool); itkGetMacro(IsMetadataReady, bool); itkGetMacro(IsGeometryReady, bool); protected: USImageVideoSource(); virtual ~USImageVideoSource(); /** * \brief The source of the video */ mitk::OpenCVVideoSource::Pointer m_OpenCVVideoSource; /** * \brief The Following flags are used internally, to assure that all necessary steps are taken before capturing */ bool m_IsVideoReady; bool m_IsMetadataReady; bool m_IsGeometryReady; mitk::OpenCVToMitkImageFilter::Pointer m_OpenCVToMitkFilter; }; } // namespace mitk #endif /* MITKUSImageVideoSource_H_HEADER_INCLUDED_ */ \ No newline at end of file diff --git a/Modules/US/USFilters/mitkUSVideoDevice.h b/Modules/US/USFilters/mitkUSVideoDevice.h index 54f13a7558..e39ae8cb89 100644 --- a/Modules/US/USFilters/mitkUSVideoDevice.h +++ b/Modules/US/USFilters/mitkUSVideoDevice.h @@ -1,60 +1,65 @@ /*========================================================================= 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 MITKUSVideoDevice_H_HEADER_INCLUDED_ #define MITKUSVideoDevice_H_HEADER_INCLUDED_ #include #include #include "mitkUSDevice.h" #include #include "mitkUSImageVideoSource.h" namespace mitk { /**Documentation - * \brief TODO + * \brief A VideoDevcie is the common Class for video only devcies. The capture Video Input either from + * a file or from a devcie, and transform the output into an mitkUSImage with attached Metadata. + * This simple implementation does only capture and display 2D Images without cropping or registration. + * One can simply inherit from this class and overwrite the handle 2D and handle 3D methods to get full access to the data * \ingroup US */ class MitkUS_EXPORT USVideoDevice : public mitk::USDevice { public: mitkClassMacro(USVideoDevice, mitk::USDevice); + // To open a devcie (DeviceID, Manufacturer, Model) mitkNewMacro3Param(Self, int, std::string, std::string); + // To open A VideoFile (Path, Manufacturer, Model) mitkNewMacro3Param(Self, std::string, std::string, std::string); void GenerateData(); //## getter and setter ## // itkGetMacro(Name, std::string); // itkSetMacro(Name, std::string); protected: USVideoDevice(int videoDeviceNumber, std::string manufacturer, std::string model); USVideoDevice(std::string videoFilePath, std::string manufacturer, std::string model); virtual ~USVideoDevice(); mitk::USImageVideoSource::Pointer m_Source; }; } // namespace mitk #endif \ No newline at end of file