VTK
9.2.6
|
Display an image along with a reslice cursor. More...
#include <vtkResliceImageViewer.h>
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. | |
virtual int | GetResliceMode () |
virtual void | SetResliceMode (int resliceMode) |
virtual void | SetResliceModeToAxisAligned () |
virtual void | SetResliceModeToOblique () |
virtual void | Reset () |
Reset all views back to initial state. | |
virtual void | SetSliceScrollFactor (double) |
Define a factor that will be applied in addition to the inter slice spacing when scrolling image. | |
virtual double | GetSliceScrollFactor () |
virtual void | IncrementSlice (int inc) |
Increment/Decrement slice by 'inc' slices. | |
void | SetInputData (vtkImageData *in) override |
Set/Get the input image to the viewer. | |
void | SetInputConnection (vtkAlgorithmOutput *input) override |
Set/Get the input image to the viewer. | |
void | SetColorWindow (double s) override |
Set window and level for mapping pixels to colors. | |
void | SetColorLevel (double s) override |
Set window and level for mapping pixels to colors. | |
virtual vtkResliceCursorWidget * | GetResliceCursorWidget () |
Get the internal render window, renderer, image actor, and image map instances. | |
vtkResliceCursor * | GetResliceCursor () |
Set/Get the reslice cursor. | |
void | SetResliceCursor (vtkResliceCursor *rc) |
Set/Get the reslice cursor. | |
virtual void | SetLookupTable (vtkScalarsToColors *) |
Set the lookup table. | |
vtkScalarsToColors * | GetLookupTable () |
Set the lookup table. | |
virtual void | SetThickMode (int) |
Switch to / from thick mode. | |
virtual int | GetThickMode () |
Switch to / from thick mode. | |
virtual vtkBoundedPlanePointPlacer * | GetPointPlacer () |
Get the point placer. | |
virtual vtkResliceImageViewerMeasurements * | GetMeasurements () |
Get the measurements manager. | |
virtual vtkRenderWindowInteractor * | GetInteractor () |
Get the render window interactor. | |
virtual void | SetSliceScrollOnMouseWheel (vtkTypeBool) |
Scroll slices on the mouse wheel ? | |
virtual vtkTypeBool | GetSliceScrollOnMouseWheel () |
Scroll slices on the mouse wheel ? | |
virtual void | SliceScrollOnMouseWheelOn () |
Scroll slices on the mouse wheel ? | |
virtual void | SliceScrollOnMouseWheelOff () |
Scroll slices on the mouse wheel ? | |
Public Member Functions inherited from vtkImageViewer2 | |
vtkImageViewer2 * | NewInstance () const |
virtual const char * | GetWindowName () |
Get the name of rendering window. | |
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. | |
virtual vtkImageData * | GetInput () |
Set/Get the input image to the viewer. | |
virtual int | GetSlice () |
Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). | |
virtual void | SetSlice (int s) |
Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). | |
virtual int | GetSliceMin () |
Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). | |
virtual int | GetSliceMax () |
Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). | |
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). | |
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). | |
virtual int * | GetSliceRange () |
Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). | |
virtual double | GetColorWindow () |
Set window and level for mapping pixels to colors. | |
virtual double | GetColorLevel () |
Set window and level for mapping pixels to colors. | |
virtual void | SetDisplayId (void *a) |
These are here when using a Tk window. | |
virtual void | SetWindowId (void *a) |
These are here when using a Tk window. | |
virtual void | SetParentId (void *a) |
These are here when using a Tk window. | |
virtual int * | GetPosition () |
Get the position (x and y) of the rendering window in screen coordinates (in pixels). | |
virtual void | SetPosition (int x, int y) |
Set the position (x and y) of the rendering window in screen coordinates (in pixels). | |
virtual void | SetPosition (int a[2]) |
Get the position (x and y) of the rendering window in screen coordinates (in pixels). | |
virtual int * | GetSize () |
Get the size (width and height) of the rendering window in screen coordinates (in pixels). | |
virtual void | SetSize (int width, int height) |
Set the size (width and height) of the rendering window in screen coordinates (in pixels). | |
virtual void | SetSize (int a[2]) |
Get the size (width and height) of the rendering window in screen coordinates (in pixels). | |
virtual vtkRenderWindow * | GetRenderWindow () |
Get the internal render window, renderer, image actor, and image map instances. | |
virtual vtkRenderer * | GetRenderer () |
Get the internal render window, renderer, image actor, and image map instances. | |
virtual vtkImageActor * | GetImageActor () |
Get the internal render window, renderer, image actor, and image map instances. | |
virtual vtkImageMapToWindowLevelColors * | GetWindowLevel () |
Get the internal render window, renderer, image actor, and image map instances. | |
virtual vtkInteractorStyleImage * | GetInteractorStyle () |
Get the internal render window, renderer, image actor, and image map instances. | |
virtual void | SetRenderWindow (vtkRenderWindow *arg) |
Set your own renderwindow and renderer. | |
virtual void | SetRenderer (vtkRenderer *arg) |
Set your own renderwindow and renderer. | |
virtual void | SetOffScreenRendering (vtkTypeBool) |
Create a window in memory instead of on the screen. | |
virtual vtkTypeBool | GetOffScreenRendering () |
Create a window in memory instead of on the screen. | |
virtual void | OffScreenRenderingOn () |
Create a window in memory instead of on the screen. | |
virtual void | OffScreenRenderingOff () |
Create a window in memory instead of on the screen. | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
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) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
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. | |
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. | |
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. | |
int | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
int | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
virtual void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual bool | UsesGarbageCollector () const |
Indicate whether the class uses vtkGarbageCollector or not. |
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. | |
virtual void | UpdatePointPlacer () |
vtkPlane * | GetReslicePlane () |
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode. | |
double | GetInterSliceSpacingInResliceMode () |
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode. | |
Protected Member Functions inherited from vtkImageViewer2 | |
vtkImageViewer2 () | |
~vtkImageViewer2 () override | |
vtkAlgorithm * | GetInputAlgorithm () |
vtkInformation * | GetInputInformation () |
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. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | ReportReferences (vtkGarbageCollector *) |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Additional Inherited Members | |
Static Public Member Functions inherited from vtkImageViewer2 | |
static vtkImageViewer2 * | New () |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkImageViewer2 * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (int val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static int | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
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. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
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.
Definition at line 50 of file vtkResliceImageViewer.h.
Standard VTK methods.
Definition at line 58 of file vtkResliceImageViewer.h.
anonymous enum |
Set/get the slice orientation.
Enumerator | |
---|---|
RESLICE_AXIS_ALIGNED | |
RESLICE_OBLIQUE |
Definition at line 95 of file vtkResliceImageViewer.h.
anonymous enum |
Enumerator | |
---|---|
SliceChangedEvent |
Definition at line 192 of file vtkResliceImageViewer.h.
|
protected |
|
overrideprotected |
|
static |
Standard VTK methods.
|
static |
Standard VTK methods.
|
virtual |
Standard VTK methods.
Reimplemented from vtkImageViewer2.
|
static |
Standard VTK methods.
|
protectedvirtual |
Standard VTK methods.
Reimplemented from vtkImageViewer2.
vtkResliceImageViewer * vtkResliceImageViewer::NewInstance | ( | ) | const |
Standard VTK methods.
|
overridevirtual |
Standard VTK methods.
Reimplemented from vtkImageViewer2.
|
overridevirtual |
Render the resulting image.
Reimplemented from vtkImageViewer2.
|
overridevirtual |
Set/Get the input image to the viewer.
Reimplemented from vtkImageViewer2.
|
overridevirtual |
Set/Get the input image to the viewer.
Reimplemented from vtkImageViewer2.
|
overridevirtual |
Set window and level for mapping pixels to colors.
Reimplemented from vtkImageViewer2.
|
overridevirtual |
Set window and level for mapping pixels to colors.
Reimplemented from vtkImageViewer2.
|
virtual |
Get the internal render window, renderer, image actor, and image map instances.
|
virtual |
|
virtual |
|
inlinevirtual |
Definition at line 103 of file vtkResliceImageViewer.h.
|
inlinevirtual |
Definition at line 107 of file vtkResliceImageViewer.h.
vtkResliceCursor * vtkResliceImageViewer::GetResliceCursor | ( | ) |
Set/Get the reslice cursor.
void vtkResliceImageViewer::SetResliceCursor | ( | vtkResliceCursor * | rc | ) |
Set/Get the reslice cursor.
|
virtual |
Set the lookup table.
vtkScalarsToColors * vtkResliceImageViewer::GetLookupTable | ( | ) |
Set the lookup table.
|
virtual |
Switch to / from thick mode.
|
virtual |
Switch to / from thick mode.
|
virtual |
Reset all views back to initial state.
|
virtual |
Get the point placer.
|
virtual |
Get the measurements manager.
|
virtual |
Get the render window interactor.
|
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 |
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 |
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 |
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 |
Define a factor that will be applied in addition to the inter slice spacing when scrolling image.
When the view is in axis aligned ResliceMode, and the factor is not an integer, then the new value of the slice will be rounded. Otherwise, the factor is applied normally. Default value is 1.0. Note that in axis aligned ResliceMode, the factor is applied in local coordinate (i, j, k), whereas in oblique ResliceMode, the factor is applied in world coordinate (x, y, z)
|
virtual |
|
virtual |
Increment/Decrement slice by 'inc' slices.
|
overrideprotectedvirtual |
Reimplemented from vtkImageViewer2.
|
overrideprotectedvirtual |
Reimplemented from vtkImageViewer2.
|
overrideprotectedvirtual |
Reimplemented from vtkImageViewer2.
|
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.
|
protectedvirtual |
|
protected |
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode.
|
protected |
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mode.
|
protected |
Definition at line 216 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 217 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 218 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 219 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 220 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 221 of file vtkResliceImageViewer.h.
|
protected |
Definition at line 222 of file vtkResliceImageViewer.h.