17 #ifndef __igstkImageSpatialObjectRepresentation_h
18 #define __igstkImageSpatialObjectRepresentation_h
25 #include "vtkImageActor.h"
26 #include "vtkLookupTable.h"
27 #include "vtkImageMapToColors.h"
50 template <
class TImageSpatialObject >
62 typedef TImageSpatialObject ImageSpatialObjectType;
100 virtual void PrintSelf( std::ostream& os, itk::Indent indent )
const;
132 void operator=(
const Self&);
139 vtkImageData * m_ImageData;
140 vtkImageActor * m_ImageActor;
141 vtkLookupTable * m_LUT;
142 vtkImageMapToColors * m_MapColors;
149 virtual void UpdateRepresentationProcessing();
156 void SetImageSpatialObjectProcessing();
160 void SetImage(
const vtkImageData * image );
163 void AttemptSetSliceNumberProcessing();
166 void SetSliceNumberProcessing();
169 void SetOrientationProcessing();
173 void ReportSliceNumberBoundsProcessing();
176 void ConnectVTKPipelineProcessing();
181 igstkDeclareInputMacro( ValidImageSpatialObject );
182 igstkDeclareInputMacro( NullImageSpatialObject );
183 igstkDeclareInputMacro( EmptyImageSpatialObject );
184 igstkDeclareInputMacro( SetSliceNumber );
185 igstkDeclareInputMacro( ValidSliceNumber );
186 igstkDeclareInputMacro( InvalidSliceNumber );
187 igstkDeclareInputMacro( ValidOrientation );
188 igstkDeclareInputMacro( RequestSliceNumberBounds );
189 igstkDeclareInputMacro( ConnectVTKPipeline );
192 igstkDeclareStateMacro( NullImageSpatialObject );
193 igstkDeclareStateMacro( ValidImageSpatialObject );
194 igstkDeclareStateMacro( ValidImageOrientation );
195 igstkDeclareStateMacro( ValidSliceNumber );
196 igstkDeclareStateMacro( AttemptingToSetSliceNumber );
207 typename VTKImageObserver::Pointer m_VTKImageObserver;
208 typename ImageTransformObserver::Pointer m_ImageTransformObserver;
217 #ifndef IGSTK_MANUAL_INSTANTIATION
218 #include "igstkImageSpatialObjectRepresentation.txx"
222 #endif // __igstkImageSpatialObjectRepresentation_h
unsigned int SliceNumberType
Type used for representing the slice number.
#define igstkStandardTemplatedClassTraitsMacro(classname, superclassname)
Convenience macro for the traits of a templated class.
igstkStandardTemplatedClassTraitsMacro(ImageSpatialObjectRepresentation, ObjectRepresentation) public typedef ImageSpatialObjectType::ConstPointer ImageSpatialObjectConstPointer
Macro with standard traits declarations.
void RequestGetSliceNumberBounds()
Returns the Minimum and Maximum number of slice available in the current orientation.
~ImageSpatialObjectRepresentation()
Destructor.
void SetWindowLevel(double window, double level)
Set the Window Level for the representation.
Base class for all the IGSTK classes.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
This class renders and ImageSpatialObject in a VTK scene using a slice based representation.
void DeleteActors()
Overloaded function to delete actors.
ImageSpatialObjectRepresentation()
Constructor.
::itk::SmartPointer< Self > Pointer
void RequestSetSliceNumber(SliceNumberType slice)
Request the state machine to attempt to select a slice number.
void RequestSetOrientation(OrientationType orientation)
Request the state machine to attempt to select a slice orientation.
This class represents an image object.
OrientationType
Orientation Type: Publically declared orientation types supported for slice viewing.
void SetOpacity(float alpha)
Set the opacity.
void CreateActors()
Create the VTK actors for displaying geometry.
::itk::SmartPointer< const Self > ConstPointer
igstkObserverMacro(VTKImage, VTKImageModifiedEvent, EventHelperType::VTKImagePointerType)
Observer macro that will received a event with an image as payload and will store it internally...
An abstract base class for all the igstk representation objects.
Pointer Copy() const
Return a copy of the current object representation.
vtkImageData * VTKImagePointerType
void RequestSetImageSpatialObject(const ImageSpatialObjectType *ImageSpatialObject)
Connect this representation class to the spatial object.