VTK
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkResliceImageViewer Class Reference

Display an image along with a reslice cursor. More...

#include <vtkResliceImageViewer.h>

Inheritance diagram for vtkResliceImageViewer:
[legend]
Collaboration diagram for vtkResliceImageViewer:
[legend]

Public Types

enum  { RESLICE_AXIS_ALIGNED = 0, RESLICE_OBLIQUE = 1 }
 Set/get the slice orientation. More...
 
enum  { SliceChangedEvent = 1001 }
 
- Public Types inherited from vtkImageViewer2
enum  { SLICE_ORIENTATION_YZ = 0, SLICE_ORIENTATION_XZ = 1, SLICE_ORIENTATION_XY = 2 }
 Set/get the slice orientation. More...
 
typedef vtkObject Superclass
 

Public Member Functions

void Render () override
 Render the resulting image. More...
 
virtual int GetResliceMode ()
 
virtual void SetResliceMode (int resliceMode)
 
virtual void SetResliceModeToAxisAligned ()
 
virtual void SetResliceModeToOblique ()
 
virtual void Reset ()
 Reset all views back to initial state. More...
 
virtual void IncrementSlice (int n)
 Increment/Decrement slice by 'n' slices. More...
 
void SetInputData (vtkImageData *in) override
 Set/Get the input image to the viewer. More...
 
void SetInputConnection (vtkAlgorithmOutput *input) override
 Set/Get the input image to the viewer. More...
 
void SetColorWindow (double s) override
 Set window and level for mapping pixels to colors. More...
 
void SetColorLevel (double s) override
 Set window and level for mapping pixels to colors. More...
 
virtual vtkResliceCursorWidgetGetResliceCursorWidget ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
vtkResliceCursorGetResliceCursor ()
 Set/Get the reslice cursor. More...
 
void SetResliceCursor (vtkResliceCursor *rc)
 Set/Get the reslice cursor. More...
 
virtual void SetLookupTable (vtkScalarsToColors *)
 Set the lookup table. More...
 
vtkScalarsToColorsGetLookupTable ()
 Set the lookup table. More...
 
virtual void SetThickMode (int)
 Switch to / from thick mode. More...
 
virtual int GetThickMode ()
 Switch to / from thick mode. More...
 
virtual vtkBoundedPlanePointPlacerGetPointPlacer ()
 Get the point placer. More...
 
virtual vtkResliceImageViewerMeasurementsGetMeasurements ()
 Get the measurements manager. More...
 
virtual vtkRenderWindowInteractorGetInteractor ()
 Get the render window interactor. More...
 
virtual void SetSliceScrollOnMouseWheel (vtkTypeBool)
 Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume. More...
 
virtual vtkTypeBool GetSliceScrollOnMouseWheel ()
 Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume. More...
 
virtual void SliceScrollOnMouseWheelOn ()
 Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume. More...
 
virtual void SliceScrollOnMouseWheelOff ()
 Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume. More...
 
- Public Member Functions inherited from vtkImageViewer2
vtkImageViewer2NewInstance () const
 
virtual const char * GetWindowName ()
 Get the name of rendering window. More...
 
virtual int GetSliceOrientation ()
 
virtual void SetSliceOrientation (int orientation)
 
virtual void SetSliceOrientationToXY ()
 
virtual void SetSliceOrientationToYZ ()
 
virtual void SetSliceOrientationToXZ ()
 
virtual void SetupInteractor (vtkRenderWindowInteractor *)
 Attach an interactor for the internal render window. More...
 
virtual vtkImageDataGetInput ()
 Set/Get the input image to the viewer. More...
 
virtual int GetSlice ()
 Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). More...
 
virtual void SetSlice (int s)
 Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). More...
 
virtual int GetSliceMin ()
 Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
 
virtual int GetSliceMax ()
 Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
 
virtual void GetSliceRange (int range[2])
 Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
 
virtual void GetSliceRange (int &min, int &max)
 Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
 
virtual intGetSliceRange ()
 Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
 
virtual double GetColorWindow ()
 Set window and level for mapping pixels to colors. More...
 
virtual double GetColorLevel ()
 Set window and level for mapping pixels to colors. More...
 
virtual void SetDisplayId (void *a)
 These are here when using a Tk window. More...
 
virtual void SetWindowId (void *a)
 These are here when using a Tk window. More...
 
virtual void SetParentId (void *a)
 These are here when using a Tk window. More...
 
virtual intGetPosition ()
 Set/Get the position in screen coordinates of the rendering window. More...
 
virtual void SetPosition (int a, int b)
 Set/Get the position in screen coordinates of the rendering window. More...
 
virtual void SetPosition (int a[2])
 Set/Get the position in screen coordinates of the rendering window. More...
 
virtual intGetSize ()
 Set/Get the size of the window in screen coordinates in pixels. More...
 
virtual void SetSize (int a, int b)
 Set/Get the size of the window in screen coordinates in pixels. More...
 
virtual void SetSize (int a[2])
 Set/Get the size of the window in screen coordinates in pixels. More...
 
virtual vtkRenderWindowGetRenderWindow ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
virtual vtkRendererGetRenderer ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
virtual vtkImageActorGetImageActor ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
virtual vtkImageMapToWindowLevelColorsGetWindowLevel ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
virtual vtkInteractorStyleImageGetInteractorStyle ()
 Get the internal render window, renderer, image actor, and image map instances. More...
 
virtual void SetRenderWindow (vtkRenderWindow *arg)
 Set your own renderwindow and renderer. More...
 
virtual void SetRenderer (vtkRenderer *arg)
 Set your own renderwindow and renderer. More...
 
virtual void SetOffScreenRendering (vtkTypeBool)
 Create a window in memory instead of on the screen. More...
 
virtual vtkTypeBool GetOffScreenRendering ()
 Create a window in memory instead of on the screen. More...
 
virtual void OffScreenRenderingOn ()
 Create a window in memory instead of on the screen. More...
 
virtual void OffScreenRenderingOff ()
 Create a window in memory instead of on the screen. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Protected Member Functions

 vtkResliceImageViewer ()
 
 ~vtkResliceImageViewer () override
 
void InstallPipeline () override
 
void UnInstallPipeline () override
 
void UpdateOrientation () override
 
void UpdateDisplayExtent () override
 Update the display extent manually so that the proper slice for the given orientation is displayed. More...
 
virtual void UpdatePointPlacer ()
 
vtkPlaneGetReslicePlane ()
 Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode. More...
 
double GetInterSliceSpacingInResliceMode ()
 Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode. More...
 
- Protected Member Functions inherited from vtkImageViewer2
 vtkImageViewer2 ()
 
 ~vtkImageViewer2 () override
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkInformationGetInputInformation ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

vtkResliceCursorWidgetResliceCursorWidget
 
vtkBoundedPlanePointPlacerPointPlacer
 
int ResliceMode
 
vtkResliceImageViewerMeasurementsMeasurements
 
vtkTypeBool SliceScrollOnMouseWheel
 
vtkResliceImageViewerScrollCallback * ScrollCallback
 
- Protected Attributes inherited from vtkImageViewer2
vtkImageMapToWindowLevelColorsWindowLevel
 
vtkRenderWindowRenderWindow
 
vtkRendererRenderer
 
vtkImageActorImageActor
 
vtkRenderWindowInteractorInteractor
 
vtkInteractorStyleImageInteractorStyle
 
int SliceOrientation
 
int FirstRender
 
int Slice
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 
typedef vtkImageViewer2 Superclass
 Standard VTK methods. More...
 
static vtkResliceImageViewerNew ()
 Standard VTK methods. More...
 
static vtkTypeBool IsTypeOf (const char *type)
 Standard VTK methods. More...
 
static vtkResliceImageViewerSafeDownCast (vtkObjectBase *o)
 Standard VTK methods. More...
 
virtual vtkTypeBool IsA (const char *type)
 Standard VTK methods. More...
 
vtkResliceImageViewerNewInstance () const
 Standard VTK methods. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Standard VTK methods. More...
 
virtual vtkObjectBaseNewInstanceInternal () const
 Standard VTK methods. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from vtkImageViewer2
static vtkImageViewer2New ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkImageViewer2SafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Detailed Description

Display an image along with a reslice cursor.

This class is similar to vtkImageViewer2. It displays the image along with a two cross hairs for reslicing. The cross hairs may be interactively manipulated and are typically used to reslice two other views of vtkResliceImageViewer. See QtVTKRenderWindows for an example. The reslice cursor is used to perform thin or thick MPR through data. The class can also default to the behaviour of vtkImageViewer2 if the Reslice mode is set to RESLICE_AXIS_ALIGNED.

See also
vtkResliceCursor vtkResliceCursorWidget vtkResliceCursorRepresentation
Examples:
vtkResliceImageViewer (Examples)

Definition at line 47 of file vtkResliceImageViewer.h.

Member Typedef Documentation

Standard VTK methods.

Definition at line 56 of file vtkResliceImageViewer.h.

Member Enumeration Documentation

anonymous enum

Set/get the slice orientation.

Enumerator
RESLICE_AXIS_ALIGNED 
RESLICE_OBLIQUE 

Definition at line 93 of file vtkResliceImageViewer.h.

anonymous enum
Enumerator
SliceChangedEvent 

Definition at line 173 of file vtkResliceImageViewer.h.

Constructor & Destructor Documentation

vtkResliceImageViewer::vtkResliceImageViewer ( )
protected
vtkResliceImageViewer::~vtkResliceImageViewer ( )
overrideprotected

Member Function Documentation

static vtkResliceImageViewer* vtkResliceImageViewer::New ( )
static

Standard VTK methods.

static vtkTypeBool vtkResliceImageViewer::IsTypeOf ( const char *  type)
static

Standard VTK methods.

virtual vtkTypeBool vtkResliceImageViewer::IsA ( const char *  type)
virtual

Standard VTK methods.

Reimplemented from vtkImageViewer2.

static vtkResliceImageViewer* vtkResliceImageViewer::SafeDownCast ( vtkObjectBase o)
static

Standard VTK methods.

virtual vtkObjectBase* vtkResliceImageViewer::NewInstanceInternal ( ) const
protectedvirtual

Standard VTK methods.

Reimplemented from vtkImageViewer2.

vtkResliceImageViewer* vtkResliceImageViewer::NewInstance ( ) const

Standard VTK methods.

void vtkResliceImageViewer::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Standard VTK methods.

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::Render ( )
overridevirtual

Render the resulting image.

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::SetInputData ( vtkImageData in)
overridevirtual

Set/Get the input image to the viewer.

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::SetInputConnection ( vtkAlgorithmOutput input)
overridevirtual

Set/Get the input image to the viewer.

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::SetColorWindow ( double  s)
overridevirtual

Set window and level for mapping pixels to colors.

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::SetColorLevel ( double  s)
overridevirtual

Set window and level for mapping pixels to colors.

Reimplemented from vtkImageViewer2.

virtual vtkResliceCursorWidget* vtkResliceImageViewer::GetResliceCursorWidget ( )
virtual

Get the internal render window, renderer, image actor, and image map instances.

virtual int vtkResliceImageViewer::GetResliceMode ( )
virtual
virtual void vtkResliceImageViewer::SetResliceMode ( int  resliceMode)
virtual
virtual void vtkResliceImageViewer::SetResliceModeToAxisAligned ( )
inlinevirtual

Definition at line 101 of file vtkResliceImageViewer.h.

virtual void vtkResliceImageViewer::SetResliceModeToOblique ( )
inlinevirtual

Definition at line 103 of file vtkResliceImageViewer.h.

vtkResliceCursor* vtkResliceImageViewer::GetResliceCursor ( )

Set/Get the reslice cursor.

void vtkResliceImageViewer::SetResliceCursor ( vtkResliceCursor rc)

Set/Get the reslice cursor.

virtual void vtkResliceImageViewer::SetLookupTable ( vtkScalarsToColors )
virtual

Set the lookup table.

vtkScalarsToColors* vtkResliceImageViewer::GetLookupTable ( )

Set the lookup table.

virtual void vtkResliceImageViewer::SetThickMode ( int  )
virtual

Switch to / from thick mode.

virtual int vtkResliceImageViewer::GetThickMode ( )
virtual

Switch to / from thick mode.

virtual void vtkResliceImageViewer::Reset ( )
virtual

Reset all views back to initial state.

virtual vtkBoundedPlanePointPlacer* vtkResliceImageViewer::GetPointPlacer ( )
virtual

Get the point placer.

virtual vtkResliceImageViewerMeasurements* vtkResliceImageViewer::GetMeasurements ( )
virtual

Get the measurements manager.

virtual vtkRenderWindowInteractor* vtkResliceImageViewer::GetInteractor ( )
virtual

Get the render window interactor.

virtual void vtkResliceImageViewer::SetSliceScrollOnMouseWheel ( vtkTypeBool  )
virtual

Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume.

virtual vtkTypeBool vtkResliceImageViewer::GetSliceScrollOnMouseWheel ( )
virtual

Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume.

virtual void vtkResliceImageViewer::SliceScrollOnMouseWheelOn ( )
virtual

Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume.

virtual void vtkResliceImageViewer::SliceScrollOnMouseWheelOff ( )
virtual

Scroll slices on the mouse wheel ? In the case of MPR view, it moves one "normalized spacing" in the direction of the normal to the resliced plane, provided the new center will continue to lie within the volume.

virtual void vtkResliceImageViewer::IncrementSlice ( int  n)
virtual

Increment/Decrement slice by 'n' slices.

void vtkResliceImageViewer::InstallPipeline ( )
overrideprotectedvirtual

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::UnInstallPipeline ( )
overrideprotectedvirtual

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::UpdateOrientation ( )
overrideprotectedvirtual

Reimplemented from vtkImageViewer2.

void vtkResliceImageViewer::UpdateDisplayExtent ( )
overrideprotectedvirtual

Update the display extent manually so that the proper slice for the given orientation is displayed.

It will also try to set a reasonable camera clipping range. This method is called automatically when the Input is changed, but most of the time the input of this class is likely to remain the same, i.e. connected to the output of a filter, or an image reader. When the input of this filter or reader itself is changed, an error message might be displayed since the current display extent is probably outside the new whole extent. Calling this method will ensure that the display extent is reset properly.

Reimplemented from vtkImageViewer2.

virtual void vtkResliceImageViewer::UpdatePointPlacer ( )
protectedvirtual
vtkPlane* vtkResliceImageViewer::GetReslicePlane ( )
protected

Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode.

double vtkResliceImageViewer::GetInterSliceSpacingInResliceMode ( )
protected

Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode.

Member Data Documentation

vtkResliceCursorWidget* vtkResliceImageViewer::ResliceCursorWidget
protected

Definition at line 194 of file vtkResliceImageViewer.h.

vtkBoundedPlanePointPlacer* vtkResliceImageViewer::PointPlacer
protected

Definition at line 195 of file vtkResliceImageViewer.h.

int vtkResliceImageViewer::ResliceMode
protected

Definition at line 196 of file vtkResliceImageViewer.h.

vtkResliceImageViewerMeasurements* vtkResliceImageViewer::Measurements
protected

Definition at line 197 of file vtkResliceImageViewer.h.

vtkTypeBool vtkResliceImageViewer::SliceScrollOnMouseWheel
protected

Definition at line 198 of file vtkResliceImageViewer.h.

vtkResliceImageViewerScrollCallback* vtkResliceImageViewer::ScrollCallback
protected

Definition at line 199 of file vtkResliceImageViewer.h.


The documentation for this class was generated from the following file: