13 #ifndef mitkPlanarFigure_h
14 #define mitkPlanarFigure_h
77 virtual bool IsClosed()
const;
81 virtual bool IsPlaced()
const {
return m_FigurePlaced; };
92 virtual void PlaceFigure(
const Point2D &point);
104 virtual bool AddControlPoint(
const Point2D &point,
int index = -1);
106 virtual bool SetControlPoint(
unsigned int index,
const Point2D &point,
bool createIfDoesNotExist =
false);
108 virtual bool SetCurrentControlPoint(
const Point2D &point);
111 unsigned int GetNumberOfControlPoints()
const;
118 virtual unsigned int GetMinimumNumberOfControlPoints()
const = 0;
125 virtual unsigned int GetMaximumNumberOfControlPoints()
const = 0;
128 virtual bool SelectControlPoint(
unsigned int index);
131 virtual bool DeselectControlPoint();
136 Point2D GetControlPoint(
unsigned int index)
const;
142 virtual int GetControlPointForPolylinePoint(
int indexOfPolylinePoint,
int polyLineIndex)
const;
145 Point3D GetWorldControlPoint(
unsigned int index)
const;
149 const PolyLineType GetPolyLine(
unsigned int index);
153 const PolyLineType GetPolyLine(
unsigned int index)
const;
157 const PolyLineType GetHelperPolyLine(
unsigned int index,
double mmPerDisplayUnit,
unsigned int displayHeight);
160 void SetPreviewControlPoint(
const Point2D &point);
163 void ResetPreviewContolPoint();
166 bool IsPreviewControlPointVisible()
const;
169 Point2D GetPreviewControlPoint()
const;
173 virtual unsigned int GetNumberOfFeatures()
const;
176 const char *GetFeatureName(
unsigned int index)
const;
179 const char *GetFeatureUnit(
unsigned int index)
const;
183 double GetQuantity(
unsigned int index)
const;
188 bool IsFeatureActive(
unsigned int index)
const;
191 bool IsFeatureVisible(
unsigned int index)
const;
195 void SetFeatureVisible(
unsigned int index,
bool visible);
198 virtual void EvaluateFeatures();
201 void UpdateOutputInformation()
override;
204 void SetRequestedRegionToLargestPossibleRegion()
override;
207 bool RequestedRegionIsOutsideOfTheBufferedRegion()
override;
210 bool VerifyRequestedRegion()
override;
213 void SetRequestedRegion(
const itk::DataObject *data)
override;
216 virtual unsigned short GetPolyLinesSize();
219 virtual unsigned short GetHelperPolyLinesSize()
const;
222 virtual bool IsHelperToBePainted(
unsigned int index)
const;
229 virtual bool ResetOnPointSelect();
230 virtual bool ResetOnPointSelectNeeded()
const;
233 virtual void RemoveControlPoint(
unsigned int index);
236 virtual void RemoveLastControlPoint();
243 virtual Point2D ApplyControlPointConstraints(
unsigned int ,
const Point2D &point);
252 void ResetNumberOfControlPoints(
int numberOfControlPoints);
262 virtual unsigned int AddFeature(
const char *featureName,
const char *unitName);
265 void SetFeatureName(
unsigned int index,
const char *featureName);
268 void SetFeatureUnit(
unsigned int index,
const char *unitName);
271 void SetQuantity(
unsigned int index,
double quantity);
274 void ActivateFeature(
unsigned int index);
277 void DeactivateFeature(
unsigned int index);
281 virtual void GeneratePolyLine() = 0;
285 virtual void GenerateHelperPolyLine(
double mmPerDisplayUnit,
unsigned int displayHeight) = 0;
289 virtual void EvaluateFeaturesInternal() = 0;
294 void InitializeTimeGeometry(
unsigned int timeSteps = 1)
override;
297 void SetNumberOfPolyLines(
unsigned int numberOfPolyLines);
300 void AppendPointToPolyLine(
unsigned int index, PolyLineElement element);
303 void ClearPolyLines();
306 void SetNumberOfHelperPolyLines(
unsigned int numberOfHelperPolyLines);
309 void AppendPointToHelperPolyLine(
unsigned int index, PolyLineElement element);
312 void ClearHelperPolyLines();
314 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
340 Feature(
const char *name,
const char *unit) : Name(name), Unit(unit), Quantity(0.0), Active(true), Visible(true)
351 itk::LightObject::Pointer InternalClone()
const override = 0;
353 bool m_PolyLineUpToDate;
354 bool m_HelperLinesUpToDate;
355 bool m_FeaturesUpToDate;
358 typedef std::vector<Feature> FeatureVectorType;
359 FeatureVectorType m_Features;
361 unsigned long m_FeaturesMTime;
367 std::pair<double, unsigned int> m_DisplaySize;