00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkPolygonGroupSpatialObject.h,v $ 00005 Language: C++ 00006 Date: $Date: 2007/01/28 19:24:56 $ 00007 Version: $Revision: 1.11 $ 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 __itkPolygonGroupSpatialObject_h 00018 #define __itkPolygonGroupSpatialObject_h 00019 00020 #ifdef _MSC_VER 00021 #pragma warning ( disable : 4786 ) 00022 #endif 00023 00024 #include "itkGroupSpatialObject.h" 00025 #include "itkPolygonGroupOrientation.h" 00026 #include "itkPolygonSpatialObject.h" 00027 00028 namespace itk 00029 { 00030 00031 00054 template <unsigned int TDimension = 3> class 00055 PolygonGroupSpatialObject 00056 :public GroupSpatialObject<TDimension> 00057 { 00058 public: 00059 typedef PolygonGroupSpatialObject< TDimension > Self; 00060 typedef GroupSpatialObject< TDimension > Superclass; 00061 typedef SmartPointer < Self > Pointer; 00062 typedef SmartPointer < const Self > ConstPointer; 00063 typedef typename Superclass::PointType PointType; 00064 typedef typename Superclass::BoundingBoxType BoundingBoxType; 00065 typedef typename Superclass::ChildrenListType ChildrenListType; 00066 typedef typename Superclass::TreeNodeType TreeNodeType; 00067 typedef typename TreeNodeType::ChildrenListType TreeNodeChildrenListType; 00068 00070 itkNewMacro( Self ); 00071 00073 itkTypeMacro( PolygonGroupSpatialObject, GroupSpatialObject ); 00074 00077 bool AddStrand(PolygonSpatialObject<TDimension> *toAdd); 00078 00081 bool DeleteStrand(PolygonSpatialObject<TDimension> *toDelete); 00082 00086 bool ReplaceStrand(PolygonSpatialObject<TDimension> *toReplace, 00087 PolygonSpatialObject<TDimension> *replacement); 00088 00090 bool IsClosed(); 00091 00093 unsigned int NumberOfStrands(); 00094 00097 double Volume(); 00098 00100 double MeasureVolume(); 00101 00103 virtual bool IsInside( const PointType & point, 00104 unsigned int depth=0, 00105 char * name=NULL) const; 00106 00107 protected: 00108 PolygonGroupSpatialObject(const Self&); //purposely not implemented 00109 void operator=(const Self&); //purposely not implemented 00110 00111 PolygonGroupSpatialObject( void ) {} 00112 ~PolygonGroupSpatialObject( void ) {} 00113 00114 }; 00115 } 00116 #ifndef ITK_MANUAL_INSTANTIATION 00117 #include "itkPolygonGroupSpatialObject.txx" 00118 #endif 00119 00120 #endif 00121