Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPolygonSpatialObject.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPolygonSpatialObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:50 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkPolygonSpatialObject_h 00018 #define __itkPolygonSpatialObject_h 00019 #include "itkBlobSpatialObject.h" 00020 #include "itkPolygonGroupOrientation.h" 00021 00022 namespace itk 00023 { 00024 template <unsigned int TDimension = 3> class 00025 PolygonSpatialObject 00026 :public BlobSpatialObject<TDimension> 00027 { 00028 public: 00029 typedef PolygonSpatialObject<TDimension> Self; 00030 typedef BlobSpatialObject< TDimension > Superclass; 00031 typedef SmartPointer < Self > Pointer; 00032 typedef SmartPointer < const Self > ConstPointer; 00033 typedef typename Superclass::PointType PointType; 00034 typedef typename Superclass::PointListType PointListType; 00035 typedef typename Superclass::BlobPointType BlobPointType; 00037 itkNewMacro( Self ); 00038 00040 itkTypeMacro( Self, Superclass ); 00041 00043 PolygonGroupOrientation Plane(); 00045 itkSetMacro(Thickness,double); 00047 itkGetMacro(Thickness,double); 00048 bool IsClosed(); 00049 unsigned int NumberOfPoints() const; 00051 PointType ClosestPoint(PointType &curPoint); 00053 double MeasureArea(); 00055 double MeasureVolume(); 00057 double MeasurePerimeter(); 00059 bool DeletePoint(PointType &pointToDelete); 00061 bool AddPoint(PointType &pointToAdd); 00063 bool InsertPoint(PointType &point1, PointType &pointToAdd); 00065 bool ReplacePoint(PointType &oldpoint, PointType &newPoint); 00067 bool RemoveSegment(PointType &startpoint,PointType &endPoint); 00069 virtual bool IsInside( const PointType & point, 00070 unsigned int depth=0, 00071 char * name = NULL) const; 00072 private: 00073 PolygonGroupOrientation m_Orientation; 00074 double m_Thickness; 00075 PolygonSpatialObject() 00076 { 00077 m_Orientation = Unknown; 00078 m_Thickness = 0.0; 00079 } 00080 }; 00081 } 00082 #ifndef ITK_MANUAL_INSTANTIATION 00083 #include "itkPolygonSpatialObject.txx" 00084 #endif 00085 00086 #endif // __itkPolygonSpatialObject_h

Generated at Sat Mar 31 02:27:26 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000