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

#include <albaGizmoSlice.h>

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

Public Types

enum  GISMO_SLICE_AXIS_ID { GIZMO_SLICE_X = 0 , GIZMO_SLICE_Y , GIZMO_SLICE_Z }
 
- Public Types inherited from albaGizmoInterface
enum  MODALITY { G_LOCAL = 0 , G_GLOBAL }
 

Public Member Functions

 albaGizmoSlice (albaVME *inputVme, albaObserver *Listener=NULL, const char *name="GizmoSlice", bool inverseHandle=false, double centralClipfactor=0)
 
virtual ~albaGizmoSlice ()
 
void Show (bool show)
 
void SetInput (albaVME *vme)
 
void SetColor (double col[3])
 
void SetCentralClipFactor (double factor)
 
albaVMEGetOutput ()
 
void UpdateGizmoSliceInLocalPositionOnAxis (int gizmoSliceId, int axis, double positionOnAxis, bool visibleCubeHandler=true)
 
void SetGizmoMovingModalityToBound ()
 
void SetGizmoMovingModalityToSnap ()
 
int GetGizmoMovingModality ()
 
void SetGizmoEnableMoving (bool enable)
 
void OnEvent (albaEventBase *alba_event)
 
void GetPosition (double *slicePlaneOrigin)
 
void SetModalityToGlobal ()
 
void SetPosition (albaMatrix *matrix)
 
albaMatrixGetPosition ()
 
void SetHandleCenterMatrix (albaMatrix *m)
 
void SetEnableCustomizedSnapArray (bool enable)
 
void SetCustomizedSnapArrayStep (double step)
 
double * GetBounds ()
 
void SetBounds (double *val)
 
- Public Member Functions inherited from albaGizmoInterface
void SetName (albaString name)
 
albaString GetName ()
 
virtual void SetInput (albaVME *vme)
 
albaVMEGetInput ()
 
void SetMediator (albaObserver *mediator)
 
albaObserverGetMediator ()
 
void SetAutoscale (bool autoscale)
 
bool GetAutoscale ()
 
void SetRenderWindowHeightPercentage (double percentage)
 
double GetRenderWindowHeightPercentage ()
 
void SetAlwaysVisible (bool alwaysVisible)
 
bool GetAlwaysVisible ()
 
void SetListener (albaObserver *listener)
 
albaObserverGetListener ()
 
virtual void OnEvent (albaEventBase *alba_event)
 
virtual void Show (bool show)
 
void SetModalityToLocal ()
 
void SetModalityToGlobal ()
 
int GetModality ()
 
virtual void SetAbsPose (albaMatrix *absPose)
 
virtual albaMatrixGetAbsPose ()
 
virtual albaGUIGetGui ()
 
- Public Member Functions inherited from albaObserver
 albaObserver ()
 
virtual ~albaObserver ()
 
virtual void OnEvent (albaEventBase *e)=0
 

Protected Types

enum  MOVING_MODALITY_ID { BOUND = 0 , SNAP , MOVING_MODALITY_NUMBERS }
 

Protected Member Functions

void CreateGizmoSlice (albaVME *imputVme, albaObserver *listener, const char *name, bool inverseHandle, double centralClipfactor)
 
void DestroyGizmoSlice ()
 
double GetBorderCube ()
 
void InitSnapArray (albaVME *vol, int axis)
 
void SetOnSnapArray (int axis)
 
- Protected Member Functions inherited from albaGizmoInterface
 albaGizmoInterface ()
 
virtual ~albaGizmoInterface ()
 
void SendTransformMatrix (albaMatrix *matrix, int eventId, long arg)
 
virtual void OnEventGizmoGui (albaEventBase *alba_event)
 
virtual void OnEventGizmoComponents (albaEventBase *alba_event)
 

Protected Attributes

albaString m_Name
 
long m_Id
 
albaVMEGizmo * m_VmeGizmo
 
albaInteractorCompositorMousem_GizmoBehavior
 
vtkDoubleArray * m_SnapArray
 
double m_Bounds [6]
 
albaMatrixm_GizmoHandleCenterMatrix
 
vtkPoints * m_Point
 
bool m_CustomizedSnapArrayFlag
 
double m_CustomizedArrayStep
 
int m_Axis
 
int m_MovingModality
 
albaInteractorGenericMousem_MouseBH
 
bool m_InverseHandle
 
double m_CentralClipFactor
 
- Protected Attributes inherited from albaGizmoInterface
albaObserverm_Mediator
 
albaString m_Name
 
albaVMEm_InputVME
 
int m_Modality
 
albaObserverm_Listener
 
albaVMEm_RefSysVME
 
bool m_Visibility
 
double m_RenderWindowHeightPercentage
 
bool m_AlwaysVisible
 
bool m_Autoscale
 

Detailed Description

Gizmo typically used to move volume slices.

It is reparented under the input vme ie it is working in local coordinates.

See also
albaViewRXCT, albaViewOrthoSlice for usage examples: these views act as mediators between gizmo slices

Definition at line 41 of file albaGizmoSlice.h.

Member Enumeration Documentation

◆ GISMO_SLICE_AXIS_ID

Enumerator
GIZMO_SLICE_X 
GIZMO_SLICE_Y 
GIZMO_SLICE_Z 

Definition at line 68 of file albaGizmoSlice.h.

◆ MOVING_MODALITY_ID

Enumerator
BOUND 
SNAP 
MOVING_MODALITY_NUMBERS 

Definition at line 137 of file albaGizmoSlice.h.

Constructor & Destructor Documentation

◆ albaGizmoSlice()

albaGizmoSlice::albaGizmoSlice ( albaVME inputVme,
albaObserver Listener = NULL,
const char *  name = "GizmoSlice",
bool  inverseHandle = false,
double  centralClipfactor = 0 
)

◆ ~albaGizmoSlice()

virtual albaGizmoSlice::~albaGizmoSlice ( )
virtual

Member Function Documentation

◆ Show()

void albaGizmoSlice::Show ( bool  show)
virtual

Show/Hide the gizmos using actor visibility instead of pipe creation/destruction: this is used for faster rendering.

Reimplemented from albaGizmoInterface.

◆ SetInput()

void albaGizmoSlice::SetInput ( albaVME vme)
virtual

This method is used to change the input vme.

Reimplemented from albaGizmoInterface.

◆ SetColor()

void albaGizmoSlice::SetColor ( double  col[3])

Set the gizmo color.

◆ SetCentralClipFactor()

void albaGizmoSlice::SetCentralClipFactor ( double  factor)
inline

Set the central clip length in order to create a less invasive gizmo.

Definition at line 60 of file albaGizmoSlice.h.

◆ GetOutput()

albaVME * albaGizmoSlice::GetOutput ( )

return the gizmo slice object

◆ UpdateGizmoSliceInLocalPositionOnAxis()

void albaGizmoSlice::UpdateGizmoSliceInLocalPositionOnAxis ( int  gizmoSliceId,
int  axis,
double  positionOnAxis,
bool  visibleCubeHandler = true 
)

Create the gizmo slice with its id on choosed position on choosed axis.

◆ SetGizmoMovingModalityToBound()

void albaGizmoSlice::SetGizmoMovingModalityToBound ( )

Set/Get the gizmo moving modality, default is Snap.

◆ SetGizmoMovingModalityToSnap()

void albaGizmoSlice::SetGizmoMovingModalityToSnap ( )

◆ GetGizmoMovingModality()

int albaGizmoSlice::GetGizmoMovingModality ( )
inline

Definition at line 78 of file albaGizmoSlice.h.

◆ SetGizmoEnableMoving()

void albaGizmoSlice::SetGizmoEnableMoving ( bool  enable)

◆ OnEvent()

void albaGizmoSlice::OnEvent ( albaEventBase alba_event)
virtual

Events handling method.

Reimplemented from albaGizmoInterface.

◆ GetPosition() [1/2]

void albaGizmoSlice::GetPosition ( double *  slicePlaneOrigin)

◆ SetModalityToGlobal()

void albaGizmoSlice::SetModalityToGlobal ( )
inline

Gizmo is reparented under the vme tree root, this modality is currently not supported.

Definition at line 89 of file albaGizmoSlice.h.

References albaLogMessage().

Here is the call graph for this function:

◆ SetPosition()

void albaGizmoSlice::SetPosition ( albaMatrix matrix)

◆ GetPosition() [2/2]

albaMatrix * albaGizmoSlice::GetPosition ( )
inline

Definition at line 92 of file albaGizmoSlice.h.

◆ SetHandleCenterMatrix()

void albaGizmoSlice::SetHandleCenterMatrix ( albaMatrix m)

Set matrix of the handle.

◆ SetEnableCustomizedSnapArray()

void albaGizmoSlice::SetEnableCustomizedSnapArray ( bool  enable)
inline

Definition at line 97 of file albaGizmoSlice.h.

◆ SetCustomizedSnapArrayStep()

void albaGizmoSlice::SetCustomizedSnapArrayStep ( double  step)
inline

Definition at line 98 of file albaGizmoSlice.h.

◆ GetBounds()

double * albaGizmoSlice::GetBounds ( )
inline

Definition at line 100 of file albaGizmoSlice.h.

◆ SetBounds()

void albaGizmoSlice::SetBounds ( double *  val)

◆ CreateGizmoSlice()

void albaGizmoSlice::CreateGizmoSlice ( albaVME imputVme,
albaObserver listener,
const char *  name,
bool  inverseHandle,
double  centralClipfactor 
)
protected

◆ DestroyGizmoSlice()

void albaGizmoSlice::DestroyGizmoSlice ( )
protected

◆ GetBorderCube()

double albaGizmoSlice::GetBorderCube ( )
protected

◆ InitSnapArray()

void albaGizmoSlice::InitSnapArray ( albaVME vol,
int  axis 
)
protected

Initialize snap array.

◆ SetOnSnapArray()

void albaGizmoSlice::SetOnSnapArray ( int  axis)
protected

Member Data Documentation

◆ m_Name

albaString albaGizmoSlice::m_Name
protected

Definition at line 116 of file albaGizmoSlice.h.

◆ m_Id

long albaGizmoSlice::m_Id
protected

Definition at line 117 of file albaGizmoSlice.h.

◆ m_VmeGizmo

albaVMEGizmo* albaGizmoSlice::m_VmeGizmo
protected

Definition at line 118 of file albaGizmoSlice.h.

◆ m_GizmoBehavior

albaInteractorCompositorMouse* albaGizmoSlice::m_GizmoBehavior
protected

Definition at line 119 of file albaGizmoSlice.h.

◆ m_SnapArray

vtkDoubleArray* albaGizmoSlice::m_SnapArray
protected

Definition at line 120 of file albaGizmoSlice.h.

◆ m_Bounds

double albaGizmoSlice::m_Bounds[6]
protected

Definition at line 121 of file albaGizmoSlice.h.

◆ m_GizmoHandleCenterMatrix

albaMatrix* albaGizmoSlice::m_GizmoHandleCenterMatrix
protected

Definition at line 123 of file albaGizmoSlice.h.

◆ m_Point

vtkPoints* albaGizmoSlice::m_Point
protected

Definition at line 124 of file albaGizmoSlice.h.

◆ m_CustomizedSnapArrayFlag

bool albaGizmoSlice::m_CustomizedSnapArrayFlag
protected

Definition at line 126 of file albaGizmoSlice.h.

◆ m_CustomizedArrayStep

double albaGizmoSlice::m_CustomizedArrayStep
protected

Definition at line 127 of file albaGizmoSlice.h.

◆ m_Axis

int albaGizmoSlice::m_Axis
protected

Register the gizmo axis, default is z.

Definition at line 130 of file albaGizmoSlice.h.

◆ m_MovingModality

int albaGizmoSlice::m_MovingModality
protected

Register the gizmo behavior: BOUND means gizmo movement is free in an interval while SNAP snaps on a given array.

Definition at line 135 of file albaGizmoSlice.h.

◆ m_MouseBH

albaInteractorGenericMouse* albaGizmoSlice::m_MouseBH
protected

Definition at line 143 of file albaGizmoSlice.h.

◆ m_InverseHandle

bool albaGizmoSlice::m_InverseHandle
protected

Definition at line 145 of file albaGizmoSlice.h.

◆ m_CentralClipFactor

double albaGizmoSlice::m_CentralClipFactor
protected

Definition at line 147 of file albaGizmoSlice.h.


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