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

widget for cropping an image More...

#include <vtkImageCroppingRegionsWidget.h>

Inheritance diagram for vtkImageCroppingRegionsWidget:
Inheritance graph
[legend]
Collaboration diagram for vtkImageCroppingRegionsWidget:
Collaboration graph
[legend]

Public Types

enum  WidgetEventIds { CroppingPlanesPositionChangedEvent = 10050 }
- Public Types inherited from vtk3DWidget
typedef vtkInteractorObserver Superclass
- Public Types inherited from vtkInteractorObserver
typedef vtkObject Superclass
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass

Public Member Functions

virtual void SetEnabled (int enabling)
virtual void PlaceWidget (double bounds[6])
virtual double * GetPlanePositions ()
virtual void GetPlanePositions (double &, double &, double &, double &, double &, double &)
virtual void GetPlanePositions (double[6])
virtual void SetPlanePositions (double pos[6])
virtual void SetPlanePositions (float pos[6])
virtual void SetPlanePositions (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)
virtual void SetCroppingRegionFlags (int flags)
virtual int GetCroppingRegionFlags ()
virtual void SetSlice (int num)
virtual int GetSlice ()
virtual void SetLine1Color (double r, double g, double b)
virtual void SetLine1Color (double rgb[3])
virtual double * GetLine1Color ()
virtual void GetLine1Color (double rgb[3])
virtual void SetLine2Color (double r, double g, double b)
virtual void SetLine2Color (double rgb[3])
virtual double * GetLine2Color ()
virtual void GetLine2Color (double rgb[3])
virtual void SetLine3Color (double r, double g, double b)
virtual void SetLine3Color (double rgb[3])
virtual double * GetLine3Color ()
virtual void GetLine3Color (double rgb[3])
virtual void SetLine4Color (double r, double g, double b)
virtual void SetLine4Color (double rgb[3])
virtual double * GetLine4Color ()
virtual void GetLine4Color (double rgb[3])
virtual void SetVolumeMapper (vtkVolumeMapper *mapper)
virtual vtkVolumeMapper * GetVolumeMapper ()
virtual void UpdateAccordingToInput ()
void MoveHorizontalLine ()
void MoveVerticalLine ()
void MoveIntersectingLines ()
void UpdateCursorIcon ()
void OnButtonPress ()
void OnButtonRelease ()
void OnMouseMove ()
- Public Member Functions inherited from vtk3DWidget
virtual void PlaceWidget ()
virtual void PlaceWidget (double xmin, double xmax, double ymin, double ymax, double zmin, double zmax)
virtual void SetProp3D (vtkProp3D *)
virtual vtkProp3D * GetProp3D ()
virtual void SetInput (vtkDataSet *)
virtual vtkDataSet * GetInput ()
virtual void SetPlaceFactor (double)
virtual double GetPlaceFactor ()
virtual void SetHandleSize (double)
virtual double GetHandleSize ()
- Public Member Functions inherited from vtkInteractorObserver
virtual void OnChar ()
int GetEnabled ()
void EnabledOn ()
void EnabledOff ()
void On ()
void Off ()
virtual void SetInteractor (vtkRenderWindowInteractor *iren)
virtual vtkRenderWindowInteractor * GetInteractor ()
virtual void SetPriority (float)
virtual float GetPriority ()
virtual void SetKeyPressActivation (int)
virtual int GetKeyPressActivation ()
virtual void KeyPressActivationOn ()
virtual void KeyPressActivationOff ()
virtual void SetKeyPressActivationValue (char)
virtual char GetKeyPressActivationValue ()
virtual vtkRenderer * GetDefaultRenderer ()
virtual void SetDefaultRenderer (vtkRenderer *)
virtual vtkRenderer * GetCurrentRenderer ()
virtual void SetCurrentRenderer (vtkRenderer *)
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void ReleaseFocus ()
- Public Member Functions inherited from vtkObject
virtual void DebugOn ()
virtual void DebugOff ()
unsigned char GetDebug ()
void SetDebug (unsigned char debugFlag)
virtual void Modified ()
virtual unsigned long GetMTime ()
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
vtkCommand * GetCommand (unsigned long tag)
void RemoveObserver (vtkCommand *)
void RemoveObservers (unsigned long event, vtkCommand *)
void RemoveObservers (const char *event, vtkCommand *)
int HasObserver (unsigned long event, vtkCommand *)
int HasObserver (const char *event, vtkCommand *)
void RemoveObserver (unsigned long tag)
void RemoveObservers (unsigned long event)
void RemoveObservers (const char *event)
void RemoveAllObservers ()
int HasObserver (unsigned long event)
int HasObserver (const char *event)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
int InvokeEvent (unsigned long event, void *callData)
int InvokeEvent (const char *event, void *callData)
int InvokeEvent (unsigned long event)
int InvokeEvent (const char *event)
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
virtual void Delete ()
virtual void FastDelete ()
void Print (ostream &os)
virtual void Register (vtkObjectBase *o)
virtual void UnRegister (vtkObjectBase *o)
void SetReferenceCount (int)
void PrintRevisions (ostream &os)
virtual void PrintHeader (ostream &os, vtkIndent indent)
virtual void PrintTrailer (ostream &os, vtkIndent indent)
int GetReferenceCount ()

Protected Types

enum  WidgetStates {
  NoLine = 0, MovingH1AndV1, MovingH2AndV1, MovingH1AndV2,
  MovingH2AndV2, MovingV1, MovingV2, MovingH1,
  MovingH2
}

Protected Member Functions

 vtkImageCroppingRegionsWidget ()
 ~vtkImageCroppingRegionsWidget ()
double GetSlicePosition ()
void SetMouseCursor (int state)
int ComputeWorldCoordinate (int x, int y, double *coord)
void UpdateOpacity ()
void UpdateGeometry ()
void ConstrainPlanePositions (double positions[6])
- Protected Member Functions inherited from vtk3DWidget
 vtk3DWidget ()
 ~vtk3DWidget ()
void AdjustBounds (double bounds[6], double newBounds[6], double center[3])
double SizeHandles (double factor)
virtual void SizeHandles ()
- Protected Member Functions inherited from vtkInteractorObserver
 vtkInteractorObserver ()
 ~vtkInteractorObserver ()
int RequestCursorShape (int requestedShape)
virtual void StartInteraction ()
virtual void EndInteraction ()
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
- Protected Member Functions inherited from vtkObject
 vtkObject ()
virtual ~vtkObject ()
virtual void RegisterInternal (vtkObjectBase *, int check)
virtual void UnRegisterInternal (vtkObjectBase *, int check)
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
void InternalReleaseFocus ()
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
virtual ~vtkObjectBase ()
virtual void CollectRevisions (ostream &os)
virtual void ReportReferences (vtkGarbageCollector *)
 vtkObjectBase (const vtkObjectBase &)
void operator= (const vtkObjectBase &)

Static Protected Member Functions

static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)

Protected Attributes

vtkVolumeMapper * VolumeMapper
vtkLineSource * LineSources [4]
vtkActor2D * LineActors [4]
vtkPolyData * RegionPolyData [9]
vtkActor2D * RegionActors [9]
double PlanePositions [6]
int SliceOrientation
int Slice
int CroppingRegionFlags
int MouseCursorState
int Moving
- Protected Attributes inherited from vtk3DWidget
vtkProp3D * Prop3D
vtkDataSet * Input
double PlaceFactor
int Placed
double InitialBounds [6]
double InitialLength
double HandleSize
int ValidPick
double LastPickPosition [3]
- Protected Attributes inherited from vtkInteractorObserver
int Enabled
vtkCallbackCommand * EventCallbackCommand
vtkCallbackCommand * KeyPressCallbackCommand
float Priority
int KeyPressActivation
char KeyPressActivationValue
vtkRenderWindowInteractor * Interactor
vtkRenderer * CurrentRenderer
vtkRenderer * DefaultRenderer
unsigned long CharObserverTag
unsigned long DeleteObserverTag
vtkObserverMediator * ObserverMediator
- Protected Attributes inherited from vtkObject
unsigned char Debug
vtkTimeStamp MTime
vtkSubjectHelper * SubjectHelper
- Protected Attributes inherited from vtkObjectBase
int ReferenceCount
vtkWeakPointerBase ** WeakPointers
typedef vtk3DWidget Superclass
static
vtkImageCroppingRegionsWidget * 
New ()
static int IsTypeOf (const char *type)
static
vtkImageCroppingRegionsWidget * 
SafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
enum  { SLICE_ORIENTATION_YZ = 0, SLICE_ORIENTATION_XZ = 1, SLICE_ORIENTATION_XY = 2 }
virtual int GetSliceOrientation ()
virtual void SetSliceOrientation (int orientation)
virtual void SetSliceOrientationToXY ()
virtual void SetSliceOrientationToYZ ()
virtual void SetSliceOrientationToXZ ()

Additional Inherited Members

- Static Public Member Functions inherited from vtkInteractorObserver
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
- Friends inherited from vtkObject

Detailed Description

widget for cropping an image

This widget displays a set of axis aligned lines that can be interactively manipulated to crop a volume. The region to be cropped away is displayed in a different highlight. Much like the vtkVolumeMapper, this widget supports 27 possible configurations of cropping planes. (See CroppingRegionFlags). If a volume mapper is set, the cropping planes are directly propagated to the volume mapper. The widget invokes a CroppingPlanesPositionChangedEvent when the position of any of the cropping planes is changed. The widget also invokes an InteractionEvent in response to user interaction.

Events:
vtkCommand::DisableEvent vtkCommand::EndInteractionEvent vtkCommand::InteractionEvent vtkCommand::StartInteractionEvent vtkCommand::EnableEvent

Definition at line 43 of file vtkImageCroppingRegionsWidget.h.

Member Typedef Documentation

Standard VTK methods.

Definition at line 50 of file vtkImageCroppingRegionsWidget.h.

Member Enumeration Documentation

anonymous enum

Set/get the slice orientation BTX

Enumerator:
SLICE_ORIENTATION_YZ 
SLICE_ORIENTATION_XZ 
SLICE_ORIENTATION_XY 

Definition at line 83 of file vtkImageCroppingRegionsWidget.h.

Events invoked by this widget

Enumerator:
CroppingPlanesPositionChangedEvent 

Definition at line 164 of file vtkImageCroppingRegionsWidget.h.

Enumerator:
NoLine 
MovingH1AndV1 
MovingH2AndV1 
MovingH1AndV2 
MovingH2AndV2 
MovingV1 
MovingV2 
MovingH1 
MovingH2 

Definition at line 205 of file vtkImageCroppingRegionsWidget.h.

Constructor & Destructor Documentation

vtkImageCroppingRegionsWidget::vtkImageCroppingRegionsWidget ( )
protected
vtkImageCroppingRegionsWidget::~vtkImageCroppingRegionsWidget ( )
protected

Member Function Documentation

static vtkImageCroppingRegionsWidget* vtkImageCroppingRegionsWidget::New ( )
static

Standard VTK methods.

Reimplemented from vtkObject.

virtual const char* vtkImageCroppingRegionsWidget::GetClassName ( )
virtual

Standard VTK methods.

Reimplemented from vtk3DWidget.

static int vtkImageCroppingRegionsWidget::IsTypeOf ( const char *  type)
static

Standard VTK methods.

Reimplemented from vtk3DWidget.

virtual int vtkImageCroppingRegionsWidget::IsA ( const char *  type)
virtual

Standard VTK methods.

Reimplemented from vtk3DWidget.

static vtkImageCroppingRegionsWidget* vtkImageCroppingRegionsWidget::SafeDownCast ( vtkObject *  o)
static

Standard VTK methods.

Reimplemented from vtk3DWidget.

void vtkImageCroppingRegionsWidget::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Standard VTK methods.

Reimplemented from vtk3DWidget.

virtual void vtkImageCroppingRegionsWidget::PlaceWidget ( double  bounds[6])
virtual

This method is used to initially place the widget. The placement of the widget depends on whether a Prop3D or input dataset is provided. If one of these two is provided, they will be used to obtain a bounding box, around which the widget is placed. Otherwise, you can manually specify a bounds with the PlaceWidget(bounds) method. Note: PlaceWidget(bounds) is required by all subclasses; the other methods are provided as convenience methods.

Implements vtk3DWidget.

virtual void vtkImageCroppingRegionsWidget::SetEnabled ( int  enabling)
virtual

Enable/disable the widget

Reimplemented from vtkInteractorObserver.

virtual double* vtkImageCroppingRegionsWidget::GetPlanePositions ( )
virtual

Set/Get the plane positions that represent the cropped region.

virtual void vtkImageCroppingRegionsWidget::GetPlanePositions ( double &  ,
double &  ,
double &  ,
double &  ,
double &  ,
double &   
)
virtual

Set/Get the plane positions that represent the cropped region.

virtual void vtkImageCroppingRegionsWidget::GetPlanePositions ( double  [6])
virtual

Set/Get the plane positions that represent the cropped region.

virtual void vtkImageCroppingRegionsWidget::SetPlanePositions ( double  pos[6])
inlinevirtual

Set/Get the plane positions that represent the cropped region.

Definition at line 66 of file vtkImageCroppingRegionsWidget.h.

virtual void vtkImageCroppingRegionsWidget::SetPlanePositions ( float  pos[6])
inlinevirtual

Set/Get the plane positions that represent the cropped region.

Definition at line 68 of file vtkImageCroppingRegionsWidget.h.

virtual void vtkImageCroppingRegionsWidget::SetPlanePositions ( double  xMin,
double  xMax,
double  yMin,
double  yMax,
double  zMin,
double  zMax 
)
virtual

Set/Get the plane positions that represent the cropped region.

virtual void vtkImageCroppingRegionsWidget::SetCroppingRegionFlags ( int  flags)
virtual

Set/Get the cropping region flags

virtual int vtkImageCroppingRegionsWidget::GetCroppingRegionFlags ( )
virtual

Set/Get the cropping region flags

virtual int vtkImageCroppingRegionsWidget::GetSliceOrientation ( )
virtual

Set/get the slice orientation BTX

virtual void vtkImageCroppingRegionsWidget::SetSliceOrientation ( int  orientation)
virtual

Set/get the slice orientation BTX

virtual void vtkImageCroppingRegionsWidget::SetSliceOrientationToXY ( )
inlinevirtual

Set/get the slice orientation BTX

Definition at line 92 of file vtkImageCroppingRegionsWidget.h.

virtual void vtkImageCroppingRegionsWidget::SetSliceOrientationToYZ ( )
inlinevirtual

Set/get the slice orientation BTX

Definition at line 94 of file vtkImageCroppingRegionsWidget.h.

virtual void vtkImageCroppingRegionsWidget::SetSliceOrientationToXZ ( )
inlinevirtual

Set/get the slice orientation BTX

Definition at line 96 of file vtkImageCroppingRegionsWidget.h.

virtual void vtkImageCroppingRegionsWidget::SetSlice ( int  num)
virtual

Set/Get the slice number

virtual int vtkImageCroppingRegionsWidget::GetSlice ( )
virtual

Set/Get the slice number

virtual void vtkImageCroppingRegionsWidget::SetLine1Color ( double  r,
double  g,
double  b 
)
virtual

Set/Get line 1 color

virtual void vtkImageCroppingRegionsWidget::SetLine1Color ( double  rgb[3])
inlinevirtual

Set/Get line 1 color

Definition at line 109 of file vtkImageCroppingRegionsWidget.h.

virtual double* vtkImageCroppingRegionsWidget::GetLine1Color ( )
virtual

Set/Get line 1 color

virtual void vtkImageCroppingRegionsWidget::GetLine1Color ( double  rgb[3])
virtual

Set/Get line 1 color

virtual void vtkImageCroppingRegionsWidget::SetLine2Color ( double  r,
double  g,
double  b 
)
virtual

Set/Get line 2 color

virtual void vtkImageCroppingRegionsWidget::SetLine2Color ( double  rgb[3])
inlinevirtual

Set/Get line 2 color

Definition at line 118 of file vtkImageCroppingRegionsWidget.h.

virtual double* vtkImageCroppingRegionsWidget::GetLine2Color ( )
virtual

Set/Get line 2 color

virtual void vtkImageCroppingRegionsWidget::GetLine2Color ( double  rgb[3])
virtual

Set/Get line 2 color

virtual void vtkImageCroppingRegionsWidget::SetLine3Color ( double  r,
double  g,
double  b 
)
virtual

Set/Get line 3 color

virtual void vtkImageCroppingRegionsWidget::SetLine3Color ( double  rgb[3])
inlinevirtual

Set/Get line 3 color

Definition at line 127 of file vtkImageCroppingRegionsWidget.h.

virtual double* vtkImageCroppingRegionsWidget::GetLine3Color ( )
virtual

Set/Get line 3 color

virtual void vtkImageCroppingRegionsWidget::GetLine3Color ( double  rgb[3])
virtual

Set/Get line 3 color

virtual void vtkImageCroppingRegionsWidget::SetLine4Color ( double  r,
double  g,
double  b 
)
virtual

Set/Get line 4 color

virtual void vtkImageCroppingRegionsWidget::SetLine4Color ( double  rgb[3])
inlinevirtual

Set/Get line 4 color

Definition at line 136 of file vtkImageCroppingRegionsWidget.h.

virtual double* vtkImageCroppingRegionsWidget::GetLine4Color ( )
virtual

Set/Get line 4 color

virtual void vtkImageCroppingRegionsWidget::GetLine4Color ( double  rgb[3])
virtual

Set/Get line 4 color

virtual void vtkImageCroppingRegionsWidget::SetVolumeMapper ( vtkVolumeMapper *  mapper)
virtual

Set/Get the input volume mapper Update the widget according to its mapper

virtual vtkVolumeMapper* vtkImageCroppingRegionsWidget::GetVolumeMapper ( )
virtual

Set/Get the input volume mapper Update the widget according to its mapper

virtual void vtkImageCroppingRegionsWidget::UpdateAccordingToInput ( )
virtual

Set/Get the input volume mapper Update the widget according to its mapper

void vtkImageCroppingRegionsWidget::MoveHorizontalLine ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::MoveVerticalLine ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::MoveIntersectingLines ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::UpdateCursorIcon ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::OnButtonPress ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::OnButtonRelease ( )

Callbacks for user interaction.

void vtkImageCroppingRegionsWidget::OnMouseMove ( )

Callbacks for user interaction.

double vtkImageCroppingRegionsWidget::GetSlicePosition ( )
protected
static void vtkImageCroppingRegionsWidget::ProcessEvents ( vtkObject *  object,
unsigned long  event,
void *  clientdata,
void *  calldata 
)
staticprotected

Handles the char widget activation event. Also handles the delete event.

Reimplemented from vtkInteractorObserver.

void vtkImageCroppingRegionsWidget::SetMouseCursor ( int  state)
protected
int vtkImageCroppingRegionsWidget::ComputeWorldCoordinate ( int  x,
int  y,
double *  coord 
)
protected
void vtkImageCroppingRegionsWidget::UpdateOpacity ( )
protected
void vtkImageCroppingRegionsWidget::UpdateGeometry ( )
protected
void vtkImageCroppingRegionsWidget::ConstrainPlanePositions ( double  positions[6])
protected

Member Data Documentation

vtkVolumeMapper* vtkImageCroppingRegionsWidget::VolumeMapper
protected

Definition at line 176 of file vtkImageCroppingRegionsWidget.h.

vtkLineSource* vtkImageCroppingRegionsWidget::LineSources[4]
protected

Definition at line 178 of file vtkImageCroppingRegionsWidget.h.

vtkActor2D* vtkImageCroppingRegionsWidget::LineActors[4]
protected

Definition at line 179 of file vtkImageCroppingRegionsWidget.h.

vtkPolyData* vtkImageCroppingRegionsWidget::RegionPolyData[9]
protected

Definition at line 180 of file vtkImageCroppingRegionsWidget.h.

vtkActor2D* vtkImageCroppingRegionsWidget::RegionActors[9]
protected

Definition at line 181 of file vtkImageCroppingRegionsWidget.h.

double vtkImageCroppingRegionsWidget::PlanePositions[6]
protected

Definition at line 183 of file vtkImageCroppingRegionsWidget.h.

int vtkImageCroppingRegionsWidget::SliceOrientation
protected

Definition at line 185 of file vtkImageCroppingRegionsWidget.h.

int vtkImageCroppingRegionsWidget::Slice
protected

Definition at line 186 of file vtkImageCroppingRegionsWidget.h.

int vtkImageCroppingRegionsWidget::CroppingRegionFlags
protected

Definition at line 190 of file vtkImageCroppingRegionsWidget.h.

int vtkImageCroppingRegionsWidget::MouseCursorState
protected

Definition at line 192 of file vtkImageCroppingRegionsWidget.h.

int vtkImageCroppingRegionsWidget::Moving
protected

Definition at line 193 of file vtkImageCroppingRegionsWidget.h.


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