17 #ifndef __igstkImageSpatialObject_h
18 #define __igstkImageSpatialObject_h
22 #include "itkImageSpatialObject.h"
25 #ifdef ITK_PRE4_VERSION
26 #include "itkOrientedImage.h"
31 #include "itkVTKImageExport.h"
32 #include "vtkImageImport.h"
33 #include "vtkImageData.h"
40 class ImageReaderToImageSpatialObject;
41 class UltrasoundImageSimulatorToImageSpatialObject;
57 template <
class TPixelType,
unsigned int TDimension >
70 ImageSpatialObjectType;
72 #ifdef ITK_PRE4_VERSION
73 typedef typename itk::OrientedImage< TPixelType, TDimension >
ImageType;
75 typedef typename itk::Image< TPixelType, TDimension >
ImageType;
155 virtual void PrintSelf( std::ostream& os, itk::Indent indent )
const;
160 typename ImageSpatialObjectType::Pointer m_ImageSpatialObject;
163 void RequestSetImage(
const ImageType * image );
174 void operator=(
const Self&);
179 igstkDeclareInputMacro( ValidImage );
180 igstkDeclareInputMacro( InvalidImage );
181 igstkDeclareInputMacro( RequestITKImage );
182 igstkDeclareInputMacro( RequestVTKImage );
183 igstkDeclareInputMacro( RequestImageExtent );
184 igstkDeclareInputMacro( RequestImageTransform );
187 igstkDeclareStateMacro( Initial );
188 igstkDeclareStateMacro( ImageSet );
191 void SetImageProcessing();
192 void ReportInvalidImageProcessing();
195 void ReportITKImageProcessing();
196 void ReportVTKImageProcessing();
197 void ReportImageExtentProcessing();
198 void ReportImageNotAvailableProcessing();
203 void ReportImageTransformProcessing();
212 typedef itk::VTKImageExport< ImageType > ITKExportFilterType;
213 typedef vtkImageImport VTKImportFilterType;
215 typedef typename ITKExportFilterType::Pointer ITKExportFilterPointer;
216 typedef VTKImportFilterType * VTKImportFilterPointer;
219 ITKExportFilterPointer m_ItkExporter;
220 VTKImportFilterPointer m_VtkImporter;
229 #ifndef IGSTK_MANUAL_INSTANTIATION
230 #include "igstkImageSpatialObject.txx"
233 #endif // __igstkImageSpatialObject_h
igstkEventMacro(ImageNotAvailableEvent, IGSTKErrorEvent)
#define igstkFriendClassMacro(type)
Create a Macro for friend class.
#define igstkStandardTemplatedClassTraitsMacro(classname, superclassname)
Convenience macro for the traits of a templated class.
igstkLoadedTemplatedConstObjectEventMacro(ITKImageModifiedEvent, IGSTKEvent, ImageType)
Event types.
Geometrical abstraction of physical objects present in the surgical scene.
virtual bool TransformPhysicalPointToIndex(const PointType &point, IndexType &index) const
Transform physical point to index.
itk::ContinuousIndex< double, 3 > ContinuousIndexType
Base class for all the IGSTK classes.
virtual bool IsInternalTransformRequired()
For coordinate systems, this method lets us indicate that we need to provide an additional transform...
void RequestGetImageTransform()
Request to get the image transform.
~ImageSpatialObject(void)
ImageType::ConstPointer ImageConstPointer
virtual bool TransformPhysicalPointToContinuousIndex(const PointType &point, ContinuousIndexType &index) const
Transform physical point to index.
::itk::SmartPointer< Self > Pointer
ImageSpatialObjectType::PointType PointType
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object informations in a stream.
itk::Point< double, 3 > PointType
ImageType::IndexType IndexType
This class represents an image object.
virtual void TransformIndexToPhysicalPoint(const IndexType &index, PointType &point) const
Transform index to physical point.
#define igstkLoggerMacro()
Macro that defines all the standard elements related to the Logger.
igstkStandardTemplatedClassTraitsMacro(ImageSpatialObject, SpatialObject) public typedef itk::Image< TPixelType, TDimension > ImageType
Macro with standard traits declarations.
virtual bool IsEmpty() const
Returns wheter the image have any pixels allocated or not.
This class is intended to make the connection between the ImageReader and its output, the ImageSpatialObject.
void RequestGetITKImage()
The ImageReaderToImageSpatialObject class is declared as a friend in order to be able to set the inpu...
This class is intended to make the connection between the UltrasoundImageSimulator and its output the...
void RequestGetVTKImage()
Request to get the VTK image as a const pointer payload into an event.
virtual bool IsInside(const PointType &point) const
Test whether a point is inside or outside the object.
virtual Transform GetInternalTransform() const
For coordinate systems, allows us to hook in the image transform to calls to RequestSetTransformAndPa...
void RequestGetImageExtent()
Request to get the VTK image extent as a const pointer payload into an event.