17 #ifndef __igstkImageResliceObjectRepresentation_h
18 #define __igstkImageResliceObjectRepresentation_h
27 class vtkImageMapToColors;
28 class vtkImageReslice;
32 class vtkOutlineFilter;
36 class vtkSphereSource;
38 class vtkImageMapToColors;
44 #define VTK_NEAREST_RESLICE 0
45 #define VTK_LINEAR_RESLICE 1
46 #define VTK_CUBIC_RESLICE 2
54 template <
class TImageSpatialObject >
66 typedef TImageSpatialObject ImageSpatialObjectType;
108 virtual
void PrintSelf( std::ostream& os, itk::Indent indent ) const;
117 ~ImageResliceObjectRepresentation();
136 ImageResliceObjectRepresentation(const
Self&);
137 void operator=(const Self&);
140 ImageSpatialObjectConstPointer m_ImageSpatialObject;
141 ImageSpatialObjectConstPointer m_ImageSpatialObjectToAdd;
144 ReslicerPlanePointerType m_ReslicePlaneSpatialObjectToBeSet;
145 ReslicerPlanePointerType m_ReslicePlaneSpatialObject;
148 vtkImageData *m_ImageData;
149 vtkImageReslice *m_ImageReslicer;
150 vtkMatrix4x4 *m_ResliceAxes;
151 vtkActor *m_ImageActor;
152 vtkProperty *m_PlaneProperty;
153 vtkImageMapToColors *m_ColorMap;
154 vtkTexture *m_Texture;
155 vtkLookupTable *m_LookupTable;
156 vtkPlaneSource *m_PlaneSource;
166 int m_ResliceInterpolate;
167 int m_TextureInterpolate;
168 int m_RestrictPlaneToVolume;
175 double m_ImageSpacing[3];
176 double m_ImageOrigin[3];
177 int m_ImageExtent[6];
183 virtual
void UpdateRepresentationProcessing();
189 void SetReslicePlaneSpatialObjectProcessing();
193 void SetImageSpatialObjectProcessing();
196 void ReportInvalidImageSpatialObjectProcessing(
void );
199 void ReportInvalidReslicePlaneSpatialObjectProcessing(
void );
202 void ReportInvalidRequestProcessing(
void );
208 void GetVector1(
double v1[3]);
211 void GetVector2(
double v1[3]);
215 void SetImage( const vtkImageData * image );
218 void ConnectVTKPipelineProcessing();
222 igstkObserverMacro( VTKImage, VTKImageModifiedEvent,
228 igstkObserverMacro( ReslicerPlaneCenter,
229 ReslicerPlaneType::ReslicerPlaneCenterEvent,
230 ReslicerPlaneType::VectorType);
232 typename ReslicerPlaneCenterObserver::
Pointer m_ReslicerPlaneCenterObserver;
234 igstkObserverMacro( ReslicerPlaneNormal,
235 ReslicerPlaneType::ReslicerPlaneNormalEvent,
236 ReslicerPlaneType::VectorType);
238 typename ReslicerPlaneNormalObserver::
Pointer m_ReslicerPlaneNormalObserver;
242 igstkObserverMacro( ImageTransform, CoordinateSystemTransformToEvent,
245 typename VTKImageObserver::
Pointer m_VTKImageObserver;
250 igstkDeclareInputMacro( ValidImageSpatialObject );
251 igstkDeclareInputMacro( InValidImageSpatialObject );
252 igstkDeclareInputMacro( ValidReslicePlaneSpatialObject );
253 igstkDeclareInputMacro( InValidReslicePlaneSpatialObject );
254 igstkDeclareInputMacro( ConnectVTKPipeline );
257 igstkDeclareStateMacro( Initial );
258 igstkDeclareStateMacro( ImageSpatialObjectSet );
259 igstkDeclareStateMacro( ReslicePlaneSpatialObjectSet );
264 #ifndef IGSTK_MANUAL_INSTANTIATION
265 #include "igstkImageResliceObjectRepresentation.txx"
269 #endif // __igstkImageResliceObjectRepresentation_h
ColorScalarType GetFrameBlue() const
void CreateActors()
Create the VTK actors for displaying geometry.
#define igstkStandardTemplatedClassTraitsMacro(classname, superclassname)
Convenience macro for the traits of a templated class.
void RequestSetReslicePlaneSpatialObject(const ReslicerPlaneType *planeSpatialObject)
igstkStandardAbstractClassTraitsMacro(ObjectRepresentation, Object) public typedef double ColorScalarType
Macro with standard traits declarations.
void SetFrameColor(ColorScalarType r, ColorScalarType g, ColorScalarType b)
Set the color of the frame around the resliced image plane.
virtual bool VerifyTimeStamp() const
Verify time stamp.
Base class for all the IGSTK classes.
void SetRestrictPlaneToVolume(int value)
Restrict the resulting resliced image to the image volume.
ImageSpatialObjectType::PointType PointType
void DeleteActors()
Overloaded function to delete actors.
This class represents an oblique image object.
defines standard system-wide macros, constants, and other common parameters in the IGSTK Library...
ReslicerPlaneType::Pointer ReslicerPlanePointerType
Pointer Copy() const
Return a copy of the current object representation.
void RequestSetImageSpatialObject(const ImageSpatialObjectType *ImageSpatialObject)
Connect this representation class to the spatial object.
::itk::SmartPointer< Self > Pointer
void SetResliceInterpolate(int value)
Set the reslice interpolation type internally used in vtkImageReslice.
virtual void PrintSelf(std::ostream &os, itk::Indent indent) const
Print the object information in a stream.
ReslicerPlaneType::VectorType VectorType
ColorScalarType GetFrameRed() const
Get each frame color component.
void SetTextureInterpolate(int value)
Set the texture interpolation type internally used in vtkTexture.
igstkStandardTemplatedClassTraitsMacro(ImageResliceObjectRepresentation, ObjectRepresentation) public typedef ImageSpatialObjectType::ConstPointer ImageSpatialObjectConstPointer
Macro with standard traits declarations.
This class represents an image object.
void SetWindowLevel(double window, double level)
Set the window level of the resliced image plane.
ColorScalarType GetFrameGreen() const
::itk::SmartPointer< const Self > ConstPointer
An abstract base class for all the igstk representation objects.
This class generates reslicing plane equation.
vtkImageData * VTKImagePointerType