ALBA
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
albaGizmoHandle Class Reference

#include <albaGizmoHandle.h>

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

Public Types

enum  CONSTRAINT_MODALITY { BOUNDS = 0 , FREE }
 
enum  GIZMOTYPE {
  XMIN = 0 , XMAX , YMIN , YMAX ,
  ZMIN , ZMAX
}
 

Public Member Functions

 albaGizmoHandle (albaVME *input, albaObserver *listener=NULL, int constraintModality=BOUNDS, albaVME *parent=NULL, bool showShadingPlane=false)
 
virtual ~albaGizmoHandle ()
 
void SetInput (albaVME *vme)
 
albaVMEGetInput ()
 
void SetListener (albaObserver *Listener)
 
albaObserverGetListener ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
void Highlight (bool highlight)
 
void Show (bool show)
 
void ShowOn ()
 
void ShowOff ()
 
bool GetShow ()
 
void SetLength (double length)
 
double GetLength ()
 
void SetAbsPose (albaMatrix *absPose)
 
albaMatrixGetAbsPose ()
 
void SetPose (albaMatrix *pose)
 
albaMatrixGetPose ()
 
void SetConstrainRefSys (albaMatrix *constrain)
 
albaMatrixGetConstrainRefSys ()
 
void SetPivotMatrix (albaMatrix &matrix)
 
albaMatrixGetPivotMatrix ()
 
void SetType (int type)
 
int GetType ()
 
void ShowShadingPlane (bool show)
 
void ShowShadingPlaneOn ()
 
void ShowShadingPlaneOff ()
 
bool GetShowShadingPlaneOn ()
 
void UpdateShadingPlaneDimension (double b[6])
 
void SetBounds (double bounds[6])
 
void GetBounds (double bounds[6])
 
void GetHandleCenter (int type, double HandleCenter[3])
 
void SetBBCenters (double bounds[6])
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Member Functions

void SetTranslationIntervals (double bounds[6])
 
void CreatePipeline ()
 
void SetColor (double col[3])
 
void SetColor (double colR, double colG, double colB)
 
void GetColor (double color[3])
 
void Update ()
 

Protected Attributes

albaVMEm_InputVme
 
vtkCubeSource * m_Cube
 
albaVMEGizmo * m_BoxGizmo
 
albaVMEGizmo * m_ShadingPlaneGizmo
 
vtkTransformPolyDataFilter * m_TranslateBoxPolyDataFilter
 
vtkTransformPolyDataFilter * m_TranslateShadingPlanePolyDataFilter
 
vtkTransform * m_TranslateBoxTr
 
vtkTransform * m_TranslateShadingPlaneTr
 
vtkTransformPolyDataFilter * m_TranslateBoxPolyDataFilterEnd
 
vtkTransformPolyDataFilter * m_TranslateShadingPlanePolyDataFilterEnd
 
vtkTransform * m_TranslateBoxTrEnd
 
vtkTransform * m_TranslateShadingPlaneTrEnd
 
vtkTransformPolyDataFilter * m_RotateBoxPolyDataFilter
 
vtkTransformPolyDataFilter * m_RotateShadingPlanePolyDataFilter
 
vtkTransform * m_RotateBoxTr
 
vtkTransform * m_RotateShadingPlaneTr
 
albaInteractorCompositorMousem_IsaComp
 
albaInteractorGenericMousem_IsaGen
 
albaObserverm_Listener
 
int m_GizmoType
 
double m_BBCenters [6][3]
 
double m_TranslationIntervals [6][2]
 
albaMatrix m_PivotMatrix
 
double m_CubeSize
 
int m_ConstraintModality
 
bool m_ShowShadingPlane
 
vtkPlaneSource * m_PlaneSource
 
vtkPlane * m_ShadingPlane
 
double m_ShadingPlaneDimension [3]
 
double m_Color [3]
 
bool m_Show
 
double m_Bounds [6]
 

Friends

class albaGizmoROITest
 
class albaGizmoHandleTest
 

Detailed Description

         ZMAX
         ---
     _  |___|  _
    |           |
   _     ___     _
  | |   |   |   | |           z

XMIN| | | | | | XMAX ^

| | y

XZ ZMIN

         YMAX
         ---
     _  |___|  _
    |           |
   _     ___     _
  | |   |   |   | |

XMIN| | | | | | XMAX


ZMAX |_ ___ _|

| |

YMIN

XY

Create a gizmo handle from the bounding box of the vme passed in the constructor. Handle initial position and moving constrains are set depending on the handle type which can be albaGizmoHandle::XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX.

See also
albaGizmoROI albaOpCrop

Definition at line 90 of file albaGizmoHandle.h.

Member Enumeration Documentation

◆ CONSTRAINT_MODALITY

Enumerator
BOUNDS 
FREE 

Definition at line 150 of file albaGizmoHandle.h.

◆ GIZMOTYPE

Enumerator
XMIN 
XMAX 
YMIN 
YMAX 
ZMIN 
ZMAX 

Definition at line 161 of file albaGizmoHandle.h.

Constructor & Destructor Documentation

◆ albaGizmoHandle()

albaGizmoHandle::albaGizmoHandle ( albaVME input,
albaObserver listener = NULL,
int  constraintModality = BOUNDS,
albaVME parent = NULL,
bool  showShadingPlane = false 
)

Create a handle, input vme must be different from NULL and default handle type is XMIN.

◆ ~albaGizmoHandle()

virtual albaGizmoHandle::~albaGizmoHandle ( )
virtual

Member Function Documentation

◆ SetInput()

void albaGizmoHandle::SetInput ( albaVME vme)

Set the gizmo generating vme; the gizmo will be centered on this vme.

◆ GetInput()

albaVME * albaGizmoHandle::GetInput ( )
inline

Definition at line 102 of file albaGizmoHandle.h.

◆ SetListener()

void albaGizmoHandle::SetListener ( albaObserver Listener)
inline

Set the event receiver object.

Definition at line 109 of file albaGizmoHandle.h.

◆ GetListener()

albaObserver * albaGizmoHandle::GetListener ( )
inline

Get the event receiver object.

Definition at line 112 of file albaGizmoHandle.h.

◆ OnEvent()

virtual void albaGizmoHandle::OnEvent ( albaEventBase alba_event)
virtual

Events handling.

Implements albaObserver.

◆ Highlight()

void albaGizmoHandle::Highlight ( bool  highlight)

Highlight the gizmo: this change its color to yellow.

◆ Show()

void albaGizmoHandle::Show ( bool  show)

Show the gizmo.

◆ ShowOn()

void albaGizmoHandle::ShowOn ( )
inline

Definition at line 126 of file albaGizmoHandle.h.

◆ ShowOff()

void albaGizmoHandle::ShowOff ( )
inline

Definition at line 127 of file albaGizmoHandle.h.

◆ GetShow()

bool albaGizmoHandle::GetShow ( )
inline

Definition at line 128 of file albaGizmoHandle.h.

◆ SetLength()

void albaGizmoHandle::SetLength ( double  length)

Set/Get the length of the handle The handle dimensions are: (Length) x (Length) ax (Length/2)

◆ GetLength()

double albaGizmoHandle::GetLength ( )

◆ SetAbsPose()

void albaGizmoHandle::SetAbsPose ( albaMatrix absPose)

Set the gizmo abs pose.

◆ GetAbsPose()

albaMatrix * albaGizmoHandle::GetAbsPose ( )

Get the gizmo abs pose.

◆ SetPose()

void albaGizmoHandle::SetPose ( albaMatrix pose)

Set the gizmo local pose.

◆ GetPose()

albaMatrix * albaGizmoHandle::GetPose ( )

Get the gizmo abs pose.

◆ SetConstrainRefSys()

void albaGizmoHandle::SetConstrainRefSys ( albaMatrix constrain)

Set the constrain ref sys.

◆ GetConstrainRefSys()

albaMatrix * albaGizmoHandle::GetConstrainRefSys ( )

Get the constrain ref sys.

◆ SetPivotMatrix()

void albaGizmoHandle::SetPivotMatrix ( albaMatrix matrix)
inline

DEPRECATED: To be removed!
Set the pivot matrix.

Definition at line 155 of file albaGizmoHandle.h.

◆ GetPivotMatrix()

albaMatrix & albaGizmoHandle::GetPivotMatrix ( )
inline

DEPRECATED: To be removed! Get the pivot matrix.

Definition at line 159 of file albaGizmoHandle.h.

◆ SetType()

void albaGizmoHandle::SetType ( int  type)

Set the gizmo type.

Type can be albaGizmoHandle::XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX. Place the gizmo on the bounding box and set its constrain

◆ GetType()

int albaGizmoHandle::GetType ( )
inline

Return the gizmo's type.

Definition at line 169 of file albaGizmoHandle.h.

◆ ShowShadingPlane()

void albaGizmoHandle::ShowShadingPlane ( bool  show)

Show shading plane.

◆ ShowShadingPlaneOn()

void albaGizmoHandle::ShowShadingPlaneOn ( )
inline

Definition at line 173 of file albaGizmoHandle.h.

◆ ShowShadingPlaneOff()

void albaGizmoHandle::ShowShadingPlaneOff ( )
inline

Definition at line 174 of file albaGizmoHandle.h.

◆ GetShowShadingPlaneOn()

bool albaGizmoHandle::GetShowShadingPlaneOn ( )
inline

Definition at line 175 of file albaGizmoHandle.h.

◆ UpdateShadingPlaneDimension()

void albaGizmoHandle::UpdateShadingPlaneDimension ( double  b[6])

Since handles position has changed shading plane bounds must be recomputed.

◆ SetBounds()

void albaGizmoHandle::SetBounds ( double  bounds[6])

Update the handle position given the bounding box.

◆ GetBounds()

void albaGizmoHandle::GetBounds ( double  bounds[6])

◆ GetHandleCenter()

void albaGizmoHandle::GetHandleCenter ( int  type,
double  HandleCenter[3] 
)

Return the center of the handle.

◆ SetBBCenters()

void albaGizmoHandle::SetBBCenters ( double  bounds[6])

DEPRECATED: To be removed, use SetBounds instead.

◆ SetTranslationIntervals()

void albaGizmoHandle::SetTranslationIntervals ( double  bounds[6])
protected

Set translation intervals.

◆ CreatePipeline()

void albaGizmoHandle::CreatePipeline ( )
protected

Create vtk objects needed.

◆ SetColor() [1/2]

void albaGizmoHandle::SetColor ( double  col[3])
protected

Set the gizmo color.

◆ SetColor() [2/2]

void albaGizmoHandle::SetColor ( double  colR,
double  colG,
double  colB 
)
protected

Set the gizmo color.

◆ GetColor()

void albaGizmoHandle::GetColor ( double  color[3])
protected

Get the gizmo color.

◆ Update()

void albaGizmoHandle::Update ( )
protected

Friends And Related Function Documentation

◆ albaGizmoROITest

friend class albaGizmoROITest
friend

friend test

Definition at line 266 of file albaGizmoHandle.h.

◆ albaGizmoHandleTest

friend class albaGizmoHandleTest
friend

Definition at line 267 of file albaGizmoHandle.h.

Member Data Documentation

◆ m_InputVme

albaVME* albaGizmoHandle::m_InputVme
protected

Register input vme.

Definition at line 195 of file albaGizmoHandle.h.

◆ m_Cube

vtkCubeSource* albaGizmoHandle::m_Cube
protected

Cube source.

Definition at line 197 of file albaGizmoHandle.h.

◆ m_BoxGizmo

albaVMEGizmo* albaGizmoHandle::m_BoxGizmo
protected

Definition at line 199 of file albaGizmoHandle.h.

◆ m_ShadingPlaneGizmo

albaVMEGizmo* albaGizmoHandle::m_ShadingPlaneGizmo
protected

Definition at line 200 of file albaGizmoHandle.h.

◆ m_TranslateBoxPolyDataFilter

vtkTransformPolyDataFilter* albaGizmoHandle::m_TranslateBoxPolyDataFilter
protected

translate PDF for box

Definition at line 202 of file albaGizmoHandle.h.

◆ m_TranslateShadingPlanePolyDataFilter

vtkTransformPolyDataFilter* albaGizmoHandle::m_TranslateShadingPlanePolyDataFilter
protected

translate PDF for box

Definition at line 203 of file albaGizmoHandle.h.

◆ m_TranslateBoxTr

vtkTransform* albaGizmoHandle::m_TranslateBoxTr
protected

translation transform for box

Definition at line 205 of file albaGizmoHandle.h.

◆ m_TranslateShadingPlaneTr

vtkTransform* albaGizmoHandle::m_TranslateShadingPlaneTr
protected

translation transform for box

Definition at line 206 of file albaGizmoHandle.h.

◆ m_TranslateBoxPolyDataFilterEnd

vtkTransformPolyDataFilter* albaGizmoHandle::m_TranslateBoxPolyDataFilterEnd
protected

translate PDF for box

Definition at line 208 of file albaGizmoHandle.h.

◆ m_TranslateShadingPlanePolyDataFilterEnd

vtkTransformPolyDataFilter* albaGizmoHandle::m_TranslateShadingPlanePolyDataFilterEnd
protected

translate PDF for box

Definition at line 209 of file albaGizmoHandle.h.

◆ m_TranslateBoxTrEnd

vtkTransform* albaGizmoHandle::m_TranslateBoxTrEnd
protected

translation transform for box

Definition at line 211 of file albaGizmoHandle.h.

◆ m_TranslateShadingPlaneTrEnd

vtkTransform* albaGizmoHandle::m_TranslateShadingPlaneTrEnd
protected

translation transform for box

Definition at line 212 of file albaGizmoHandle.h.

◆ m_RotateBoxPolyDataFilter

vtkTransformPolyDataFilter* albaGizmoHandle::m_RotateBoxPolyDataFilter
protected

rotate PDF for box

Definition at line 214 of file albaGizmoHandle.h.

◆ m_RotateShadingPlanePolyDataFilter

vtkTransformPolyDataFilter* albaGizmoHandle::m_RotateShadingPlanePolyDataFilter
protected

rotate PDF for box

Definition at line 215 of file albaGizmoHandle.h.

◆ m_RotateBoxTr

vtkTransform* albaGizmoHandle::m_RotateBoxTr
protected

rotation transform for box

Definition at line 217 of file albaGizmoHandle.h.

◆ m_RotateShadingPlaneTr

vtkTransform* albaGizmoHandle::m_RotateShadingPlaneTr
protected

rotation transform for box

Definition at line 218 of file albaGizmoHandle.h.

◆ m_IsaComp

albaInteractorCompositorMouse* albaGizmoHandle::m_IsaComp
protected

Interactor style compositor.

Definition at line 223 of file albaGizmoHandle.h.

◆ m_IsaGen

albaInteractorGenericMouse* albaGizmoHandle::m_IsaGen
protected

Generic Interactor style.

Definition at line 225 of file albaGizmoHandle.h.

◆ m_Listener

albaObserver* albaGizmoHandle::m_Listener
protected

Register the event receiver object.

Definition at line 236 of file albaGizmoHandle.h.

◆ m_GizmoType

int albaGizmoHandle::m_GizmoType
protected

Register the gizmo type.

Definition at line 238 of file albaGizmoHandle.h.

◆ m_BBCenters

double albaGizmoHandle::m_BBCenters[6][3]
protected

Definition at line 240 of file albaGizmoHandle.h.

◆ m_TranslationIntervals

double albaGizmoHandle::m_TranslationIntervals[6][2]
protected

Definition at line 241 of file albaGizmoHandle.h.

◆ m_PivotMatrix

albaMatrix albaGizmoHandle::m_PivotMatrix
protected

The Pivot Matrix.

Definition at line 243 of file albaGizmoHandle.h.

◆ m_CubeSize

double albaGizmoHandle::m_CubeSize
protected

Definition at line 247 of file albaGizmoHandle.h.

◆ m_ConstraintModality

int albaGizmoHandle::m_ConstraintModality
protected

Definition at line 249 of file albaGizmoHandle.h.

◆ m_ShowShadingPlane

bool albaGizmoHandle::m_ShowShadingPlane
protected

Definition at line 251 of file albaGizmoHandle.h.

◆ m_PlaneSource

vtkPlaneSource* albaGizmoHandle::m_PlaneSource
protected

Definition at line 253 of file albaGizmoHandle.h.

◆ m_ShadingPlane

vtkPlane* albaGizmoHandle::m_ShadingPlane
protected

Definition at line 254 of file albaGizmoHandle.h.

◆ m_ShadingPlaneDimension

double albaGizmoHandle::m_ShadingPlaneDimension[3]
protected

Definition at line 256 of file albaGizmoHandle.h.

◆ m_Color

double albaGizmoHandle::m_Color[3]
protected

Definition at line 258 of file albaGizmoHandle.h.

◆ m_Show

bool albaGizmoHandle::m_Show
protected

Definition at line 260 of file albaGizmoHandle.h.

◆ m_Bounds

double albaGizmoHandle::m_Bounds[6]
protected

Definition at line 262 of file albaGizmoHandle.h.


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