ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkPolygonGroupSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef __itkPolygonGroupSpatialObject_h
19 #define __itkPolygonGroupSpatialObject_h
20 
21 
22 #include "itkGroupSpatialObject.h"
24 
25 namespace itk
26 {
49 template< unsigned int TDimension = 3 >
50 class ITK_EXPORT PolygonGroupSpatialObject:
51  public GroupSpatialObject< TDimension >
52 {
53 public:
58  typedef typename Superclass::PointType PointType;
59  typedef typename Superclass::BoundingBoxType BoundingBoxType;
60  typedef typename Superclass::ChildrenListType ChildrenListType;
61  typedef typename Superclass::TreeNodeType TreeNodeType;
62  typedef typename TreeNodeType::ChildrenListType TreeNodeChildrenListType;
63 
65  itkNewMacro(Self);
66 
69 
72  bool AddStrand(PolygonSpatialObject< TDimension > *toAdd);
73 
76  bool DeleteStrand(PolygonSpatialObject< TDimension > *toDelete);
77 
81  bool ReplaceStrand(PolygonSpatialObject< TDimension > *toReplace,
83 
85  bool IsClosed();
86 
88  unsigned int NumberOfStrands();
89 
92  double Volume();
93 
95  double MeasureVolume();
96 
98  virtual bool IsInside(const PointType & point,
99  unsigned int depth = 0,
100  char *name = NULL) const;
101 
102 protected:
103  PolygonGroupSpatialObject(const Self &); //purposely not implemented
104  void operator=(const Self &); //purposely not implemented
105 
108 };
109 }
110 #ifndef ITK_MANUAL_INSTANTIATION
111 #include "itkPolygonGroupSpatialObject.hxx"
112 #endif
113 
114 #endif
115