ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkPolygonGroupSpatialObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkPolygonGroupSpatialObject_h
00019 #define __itkPolygonGroupSpatialObject_h
00020 
00021 
00022 #include "itkGroupSpatialObject.h"
00023 #include "itkPolygonSpatialObject.h"
00024 
00025 namespace itk
00026 {
00049 template< unsigned int TDimension = 3 >
00050 class ITK_EXPORT PolygonGroupSpatialObject:
00051   public GroupSpatialObject< TDimension >
00052 {
00053 public:
00054   typedef PolygonGroupSpatialObject< TDimension > Self;
00055   typedef GroupSpatialObject< TDimension >        Superclass;
00056   typedef SmartPointer< Self >                    Pointer;
00057   typedef SmartPointer< const Self >              ConstPointer;
00058   typedef typename Superclass::PointType          PointType;
00059   typedef typename Superclass::BoundingBoxType    BoundingBoxType;
00060   typedef typename Superclass::ChildrenListType   ChildrenListType;
00061   typedef typename Superclass::TreeNodeType       TreeNodeType;
00062   typedef typename TreeNodeType::ChildrenListType TreeNodeChildrenListType;
00063 
00065   itkNewMacro(Self);
00066 
00068   itkTypeMacro(PolygonGroupSpatialObject, GroupSpatialObject);
00069 
00072   bool AddStrand(PolygonSpatialObject< TDimension > *toAdd);
00073 
00076   bool DeleteStrand(PolygonSpatialObject< TDimension > *toDelete);
00077 
00081   bool ReplaceStrand(PolygonSpatialObject< TDimension > *toReplace,
00082                      PolygonSpatialObject< TDimension > *replacement);
00083 
00085   bool IsClosed();
00086 
00088   unsigned int NumberOfStrands();
00089 
00092   double Volume();
00093 
00095   double MeasureVolume();
00096 
00098   virtual bool IsInside(const PointType & point,
00099                         unsigned int depth = 0,
00100                         char *name = NULL) const;
00101 
00102 protected:
00103   PolygonGroupSpatialObject(const Self &); //purposely not implemented
00104   void operator=(const Self &);            //purposely not implemented
00105 
00106   PolygonGroupSpatialObject(void) {}
00107   ~PolygonGroupSpatialObject(void) {}
00108 };
00109 }
00110 #ifndef ITK_MANUAL_INSTANTIATION
00111 #include "itkPolygonGroupSpatialObject.hxx"
00112 #endif
00113 
00114 #endif
00115