Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _MITK_CONTOUR_H_
00020 #define _MITK_CONTOUR_H_
00021
00022 #include "mitkCommon.h"
00023 #include "MitkExtExports.h"
00024 #include "mitkBaseData.h"
00025 #include <vtkRenderWindow.h>
00026
00027 #include <itkPolyLineParametricPath.h>
00028
00029 namespace mitk
00030 {
00031
00036 class MitkExt_EXPORT Contour : public BaseData
00037 {
00038 public:
00039 mitkClassMacro(Contour, BaseData);
00040
00041 itkNewMacro(Self);
00042
00043 typedef itk::PolyLineParametricPath<3> PathType;
00044 typedef PathType::Pointer PathPointer;
00045 typedef PathType::ContinuousIndexType ContinuousIndexType;
00046 typedef PathType::InputType InputType;
00047 typedef PathType::OutputType OutputType;
00048 typedef PathType::OffsetType OffsetType;
00049 typedef itk::BoundingBox<unsigned long, 3, ScalarType> BoundingBoxType;
00050 typedef BoundingBoxType::PointsContainer PointsContainer;
00051 typedef BoundingBoxType::PointsContainer::Pointer PointsContainerPointer;
00052 typedef BoundingBoxType::PointsContainerIterator PointsContainerIterator;
00053
00058 itkSetMacro(Closed, bool);
00059
00063 itkGetMacro(Closed, bool);
00064
00065 itkSetMacro(Selected, bool);
00066
00067 itkGetMacro(Selected, bool);
00068
00069 itkSetMacro(Width, float);
00070
00071 itkGetMacro(Width, float);
00072
00073
00077 void Initialize();
00078
00082 void AddVertex(mitk::Point3D newPoint);
00083
00087 PathPointer GetContourPath() const;
00088
00093 void SetCurrentWindow(vtkRenderWindow* rw);
00094
00098 vtkRenderWindow* GetCurrentWindow() const;
00099
00103 unsigned int GetNumberOfPoints() const;
00104
00108 PointsContainerPointer GetPoints() const;
00109
00113 void SetPoints(PointsContainerPointer points);
00114
00118 virtual void UpdateOutputInformation();
00119
00123 virtual void SetRequestedRegionToLargestPossibleRegion();
00124
00128 virtual bool RequestedRegionIsOutsideOfTheBufferedRegion();
00129
00133 virtual bool VerifyRequestedRegion();
00134
00138 virtual void SetRequestedRegion(itk::DataObject *data);
00139
00140 protected:
00141 Contour();
00142 virtual ~Contour();
00143
00144 virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
00145
00146 private:
00147
00151 PathType::Pointer m_ContourPath;
00152
00156 vtkRenderWindow* m_CurrentWindow;
00157
00161 BoundingBoxType::Pointer m_BoundingBox;
00162
00166 BoundingBoxType::PointsContainer::Pointer m_Vertices;
00167
00171 bool m_Closed;
00172
00173 bool m_Selected;
00174
00175 float m_Width;
00176 };
00177
00178 }
00179
00180 #endif //_MITK_CONTOUR_H_