17 #ifndef __igstkUltrasoundImageSimulator_h
18 #define __igstkUltrasoundImageSimulator_h
26 #include "vtkImageReslice.h"
27 #include "itkVTKImageImport.h"
28 #include "vtkImageExport.h"
51 template <
class TUltrasoundImageSimulator,
class TImageSpatialObject >
54 TUltrasoundImageSimulator * ultrasoundImageSimulator )
56 ultrasoundImageSimulator->SetImage(imageSpatialObject->GetVTKImageData());
59 template <
class TUltrasoundImageSimulator,
class TImageSpatialObject >
62 TImageSpatialObject * imageSpatialObject )
64 imageSpatialObject->RequestSetImage( simulator->GetITKImage() );
87 template <
class TImageGeometricModel >
99 typedef TImageGeometricModel ImageGeometricModelType;
108 imageGeometricObject );
114 virtual
void PrintSelf( std::ostream& os, itk::Indent indent ) const;
119 UltrasoundImageSimulatorToImageSpatialObject );
133 ~UltrasoundImageSimulator();
145 UltrasoundImageSimulator(const
Self&);
146 void operator=(const Self&);
153 vtkImageData * m_ImageData;
154 vtkImageData * m_ReslicedImageData;
155 vtkImageReslice * m_ImageReslice;
157 typedef itk::VTKImageImport<MRImageType> VTKImageImporterType;
159 typename VTKImageImporterType::
Pointer m_VTKImageImporter;
161 TransformType m_Transform;
162 TransformType m_TransformToBeSet;
164 USImageObject::
Pointer m_USImage;
165 USImageType::
Pointer m_RescaledUSImage;
166 vtkImageExport* m_VTKExporter;
173 void SetImageGeometricModelProcessing();
176 void SetTransformProcessing();
179 void ResliceProcessing ();
183 void SetImage( const vtkImageData * image );
186 void ReportImageProcessing();
190 igstkObserverMacro( VTKImage, VTKImageModifiedEvent,
196 igstkDeclareInputMacro( ValidImageSpatialObject );
197 igstkDeclareInputMacro( NullImageSpatialObject );
199 igstkDeclareInputMacro( ValidTransform );
200 igstkDeclareInputMacro( InvalidTransform );
202 igstkDeclareInputMacro( EmptyImageSpatialObject );
203 igstkDeclareInputMacro( ConnectVTKPipeline );
205 igstkDeclareInputMacro( Reslice );
206 igstkDeclareInputMacro( GetImage );
209 igstkDeclareStateMacro( NullImageSpatialObject );
210 igstkDeclareStateMacro( ValidImageSpatialObject );
212 igstkDeclareStateMacro( NullTransform );
213 igstkDeclareStateMacro( ValidTransform );
216 const USImageType * GetITKImage() const;
218 typename VTKImageObserver::
Pointer m_VTKImageObserver;
224 #ifndef IGSTK_MANUAL_INSTANTIATION
225 #include "igstkUltrasoundImageSimulator.txx"
229 #endif // __igstkUltrasoundImageSimulator_h
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
void RequestSetImageGeometricModel(const ImageGeometricModelType *imageGeometricObject)
Connect this representation class to the spatial object.
#define igstkFriendClassMacro(type)
Create a Macro for friend class.
#define igstkStandardTemplatedClassTraitsMacro(classname, superclassname)
Convenience macro for the traits of a templated class.
ImageGeometricModelType::PointType PointType
ImageGeometricModelType::ImageType MRImageType
Base class for all the IGSTK classes.
USImageObject::ImageType USImageType
void RequestGetImage()
Declare the UltrasoundImageSimulator class to be a friend in order to give it access to the private m...
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
void RequestReslice()
Request reslice a 3D image.
::itk::SmartPointer< Self > Pointer
static void GetVTKImage(const TImageSpatialObject *imageSpatialObject, TUltrasoundImageSimulator *ultrasoundImageSimulator)
void RequestSetTransform(const TransformType &transform)
Request to set vector 2 on the plane.
Represents an Ultrasound Image Object in physical space.
igstkLoadedObjectEventMacro(ImageModifiedEvent, IGSTKEvent, USImageObject)
Event type.
static void SetITKImage(const TUltrasoundImageSimulator *simulator, TImageSpatialObject *imageSpatialObject)
ImageGeometricModelType::ConstPointer ImageGeometricModelConstPointer
Types required for internal implementation.
This class is intended to make the connection between the UltrasoundImageSimulator and its output the...
::itk::SmartPointer< const Self > ConstPointer
igstkStandardTemplatedClassTraitsMacro(UltrasoundImageSimulator, Object) public typedef Transform TransformType
Macro with standard traits declarations.
vtkImageData * VTKImagePointerType
This class simulates an ultrasound image by extracting a slice from a 3D MR or CT image...