16#ifndef __albaInteractor2DDistance_h
17#define __albaInteractor2DDistance_h
21#include "vtkALBATextActorMeter.h"
35class vtkPolyDataMapper2D;
63 DISTANCE_BETWEEN_POINTS = 0,
114 return m_Measure[m_Measure.size()-1];
130 return albaString(m_MeterVector[m_MeterVector.size()-1]->GetText());
240 double m_PickedPoint[3];
252 friend class albaInteractor2DDistanceTest;
Implementation of the message object for the Subject/Observer design pattern.
Event class to transport a triggering button and a position from pointing devices.
albaGUIDialogPreview - a dialog widget with a render window.
Class implementing an interactor for creating 2D measure tool.
int SizeMeasureVector()
Return the dimension of Measure Vector.
void UndoMeasure()
Undo the last measure.
void GenerateHistogramOn()
Turn On the generation of the histogram from the measured line.
void SetMeasureType(int t)
Set the type of the measure, selectable from DISTANCE_BETWEEN_POINTS, DISTANCE_BETWEEN_LINES and ANGL...
vtkXYPlotActor * m_PlotActor
virtual void OnLeftButtonUp(albaEventInteraction *e)
albaString GetLabel()
Get the label.
std::vector< vtkActor2D * > m_LineActorVector1
std::vector< vtkALBATextActorMeter * > m_MeterVector
void SetManualDistance(double manualDistance)
Set manual distance.
bool IsDisableUndoAndOkCancel()
Control if disabling various buttons.
virtual void OnChar(albaEventInteraction *e)
albaRWIBase * m_CurrentRwi
vtkRenderer * m_CurrentRenderer
std::vector< vtkPolyDataMapper2D * > m_LineMapperVector1
virtual ~albaInteractor2DDistance()
vtkLineSource * m_Line2
Second line of the measure tool (used for angle measures)
void SetLabel(albaString label)
Set the label.
void GenerateHistogramOff()
Turn Off the generation of the histogram.
void ShowOnlyLastMeasure(bool show)
Show On/Off only last measure.
std::vector< vtkPolyDataMapper2D * > m_LineMapperVector2
vtkActor2D * m_LineActor2
virtual void OnButtonDown2D(albaEventInteraction *e)
albaVME * m_ProbedVME
VME probed by the m_ProbingLine.
std::vector< double > m_Measure
albaGUIDialogPreview * m_HistogramDialog
virtual void OnMiddleButtonUp(albaEventInteraction *e)
virtual void OnEvent(albaEventBase *event)
Process events coming from tracker.
albaRWIBase * GetCurrentRwi()
return the current rwi
bool m_DisableUndoAndOkCancel
void SetColor(double r, double g, double b)
void GenerateHistogram(bool generate)
Turn On/Off the creation of the histogram.
std::vector< vtkLineSource * > m_LineSourceVector2
double GetLastDistance()
Get Last Distance.
void SetMeasureTypeToDistanceBetweenPoints()
Set the type of the measure to DISTANCE_BETWEEN_POINTS.
void RemoveMeter()
Remove the meters from the render window.
virtual void OnLeftButtonDown(albaEventInteraction *e)
virtual void OnButtonUp(albaEventInteraction *e)
albaDeviceButtonsPadMouse * m_Mouse
std::vector< vtkActor2D * > m_LineActorVector2
vtkPolyDataMapper2D * m_LineMapper2
void ShowAllMeasures(bool show)
Show On/Off all measures.
vtkLineSource * m_Line
First line of the measure tool.
std::vector< vtkLineSource * > m_LineSourceVector1
vtkRenderer * m_LastRenderer
Renderer used for the first line.
virtual void OnMiddleButtonDown(albaEventInteraction *e)
vtkRenderer * m_PreviousRenderer
std::vector< int > m_FlagMeasureType
void DrawMeasureTool(double x, double y)
Draw the measure tool according to the measure type selected.
bool GetRegisterMeasure()
Get the boolean value of end measure.
virtual void OnMove(albaEventInteraction *e)
vtkCoordinate * m_Coordinate
std::vector< vtkRenderer * > m_RendererVector
void CalculateMeasure()
Calculate the measure according to the measure type selected.
static albaInteractor2DDistance * NewTestInstance()
Implemented a New() function for testing mode.
vtkLineSource * m_ProbingLine
albaTypeMacro(albaInteractor2DDistance, albaInteractorPER)
albaInteractor2DDistance(bool testMode=false)
vtkPolyDataMapper2D * m_LineMapper
void SetMeasureTypeToDistanceBetweenLines()
Set the type of the measure to DISTANCE_BETWEEN_LINES.
void CreateHistogram()
Create the histogram.
Class implementing routing of events based on picking.
bool m_TestMode
Flag used with cppunitTest.
albaRWIBase is a vtkRenderWindowInteractor placed on a wxWindow
albaString - performs common string operations on c-strings.