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: 2007/01/28 19:24:56 $
00007   Version:   $Revision: 1.10 $
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::TransformType     TransformType;
00035   typedef typename Superclass::PointListType     PointListType;
00036   typedef typename Superclass::BlobPointType     BlobPointType;
00038   itkNewMacro( Self );
00039 
00041   itkTypeMacro( PolygonSpatialObject, BlobSpatialObject );
00042 
00044   PolygonGroupOrientation Plane();
00045 
00047   itkSetMacro(Thickness,double);
00048 
00050   itkGetMacro(Thickness,double);
00051 
00053   bool IsClosed();
00054 
00056   unsigned int NumberOfPoints() const;
00057 
00059   PointType ClosestPoint(PointType &curPoint);
00060 
00062   double MeasureArea();
00063 
00065   double MeasureVolume();
00066 
00068   double MeasurePerimeter();
00069 
00071   bool DeletePoint(PointType &pointToDelete);
00072 
00074   bool AddPoint(PointType &pointToAdd);
00075 
00077   bool InsertPoint(PointType &point1, PointType &pointToAdd);
00078 
00080   bool ReplacePoint(PointType &oldpoint, PointType &newPoint);
00081 
00083   bool RemoveSegment(PointType &startpoint,PointType &endPoint);
00084 
00086   virtual bool IsInside( const PointType & point,
00087                          unsigned int depth,
00088                          char * name) const;
00089 
00093   virtual bool IsInside( const PointType & point) const
00094     {
00095     return this->IsInside(point, 0, NULL);
00096     };
00098 
00099 private:
00100   PolygonSpatialObject(const Self&); //purposely not implemented
00101   void operator=(const Self&); //purposely not implemented
00102   
00103   PolygonGroupOrientation m_Orientation;
00104   double                  m_Thickness;
00105   PolygonSpatialObject() 
00106     { 
00107     m_Orientation = Unknown; 
00108     m_Thickness = 0.0;
00109     }
00110 };
00111 }
00112 #ifndef ITK_MANUAL_INSTANTIATION 
00113 #include "itkPolygonSpatialObject.txx" 
00114 #endif 
00115 
00116 #endif  // __itkPolygonSpatialObject_h
00117 

Generated at Tue Jul 29 21:46:36 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000