17 #ifndef _MITK_PLANAR_FIGURE_H_
18 #define _MITK_PLANAR_FIGURE_H_
80 virtual
bool IsClosed() const;
84 virtual
bool IsPlaced()
const {
return m_FigurePlaced; };
95 virtual void PlaceFigure(
const Point2D &point);
107 virtual bool AddControlPoint(
const Point2D &point,
int index = -1);
109 virtual bool SetControlPoint(
unsigned int index,
const Point2D &point,
bool createIfDoesNotExist =
false);
111 virtual bool SetCurrentControlPoint(
const Point2D &point);
114 unsigned int GetNumberOfControlPoints()
const;
121 virtual unsigned int GetMinimumNumberOfControlPoints()
const = 0;
128 virtual unsigned int GetMaximumNumberOfControlPoints()
const = 0;
131 virtual bool SelectControlPoint(
unsigned int index);
134 virtual bool DeselectControlPoint();
139 Point2D GetControlPoint(
unsigned int index)
const;
145 virtual int GetControlPointForPolylinePoint(
int indexOfPolylinePoint,
int polyLineIndex)
const;
148 Point3D GetWorldControlPoint(
unsigned int index)
const;
152 const PolyLineType GetPolyLine(
unsigned int index);
156 const PolyLineType GetPolyLine(
unsigned int index)
const;
160 const PolyLineType GetHelperPolyLine(
unsigned int index,
double mmPerDisplayUnit,
unsigned int displayHeight);
163 void SetPreviewControlPoint(
const Point2D &point);
166 void ResetPreviewContolPoint();
169 bool IsPreviewControlPointVisible()
const;
172 Point2D GetPreviewControlPoint()
const;
176 virtual unsigned int GetNumberOfFeatures()
const;
179 const char *GetFeatureName(
unsigned int index)
const;
182 const char *GetFeatureUnit(
unsigned int index)
const;
186 double GetQuantity(
unsigned int index)
const;
191 bool IsFeatureActive(
unsigned int index)
const;
194 bool IsFeatureVisible(
unsigned int index)
const;
198 void SetFeatureVisible(
unsigned int index,
bool visible);
201 virtual void EvaluateFeatures();
204 virtual void UpdateOutputInformation()
override;
207 virtual void SetRequestedRegionToLargestPossibleRegion()
override;
210 virtual bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
213 virtual bool VerifyRequestedRegion()
override;
216 virtual void SetRequestedRegion(
const itk::DataObject *data)
override;
219 virtual unsigned short GetPolyLinesSize();
222 virtual unsigned short GetHelperPolyLinesSize()
const;
225 virtual bool IsHelperToBePainted(
unsigned int index)
const;
232 virtual bool ResetOnPointSelect();
233 virtual bool ResetOnPointSelectNeeded()
const;
236 virtual void RemoveControlPoint(
unsigned int index);
239 virtual void RemoveLastControlPoint();
246 virtual Point2D ApplyControlPointConstraints(
unsigned int ,
const Point2D &point);
260 void ResetNumberOfControlPoints(
int numberOfControlPoints);
265 virtual unsigned int AddFeature(
const char *featureName,
const char *unitName);
268 void SetFeatureName(
unsigned int index,
const char *featureName);
271 void SetFeatureUnit(
unsigned int index,
const char *unitName);
274 void SetQuantity(
unsigned int index,
double quantity);
277 void ActivateFeature(
unsigned int index);
280 void DeactivateFeature(
unsigned int index);
284 virtual void GeneratePolyLine() = 0;
288 virtual void GenerateHelperPolyLine(
double mmPerDisplayUnit,
unsigned int displayHeight) = 0;
292 virtual void EvaluateFeaturesInternal() = 0;
297 virtual void InitializeTimeGeometry(
unsigned int timeSteps = 1)
override;
300 void SetNumberOfPolyLines(
unsigned int numberOfPolyLines);
303 void AppendPointToPolyLine(
unsigned int index, PolyLineElement element);
306 void ClearPolyLines();
309 void SetNumberOfHelperPolyLines(
unsigned int numberOfHelperPolyLines);
312 void AppendPointToHelperPolyLine(
unsigned int index, PolyLineElement element);
315 void ClearHelperPolyLines();
317 virtual void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
343 Feature(
const char *name,
const char *unit) : Name(name), Unit(unit), Quantity(0.0), Active(true), Visible(true)
356 PlaneGeometry *m_PlaneGeometry;
358 bool m_PolyLineUpToDate;
359 bool m_HelperLinesUpToDate;
360 bool m_FeaturesUpToDate;
363 typedef std::vector<Feature> FeatureVectorType;
364 FeatureVectorType m_Features;
366 unsigned long m_FeaturesMTime;
372 std::pair<double, unsigned int> m_DisplaySize;
382 #endif //_MITK_PLANAR_FIGURE_H_
itk::SmartPointer< Self > Pointer
Base of all data objects.
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
MITKNEWMODULE_EXPORT bool Equal(mitk::ExampleDataStructure *leftHandSide, mitk::ExampleDataStructure *rightHandSide, mitk::ScalarType eps, bool verbose)
Returns true if the example data structures are considered equal.
MITKCORE_EXPORT const ScalarType eps
Describes a two-dimensional, rectangular plane.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.