Orfeo Toolbox  4.0
itkTubeSpatialObject.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 __itkTubeSpatialObject_h
19 #define __itkTubeSpatialObject_h
20 
21 #include <list>
22 
25 
26 namespace itk
27 {
41 template< unsigned int TDimension = 3,
42  typename TTubePointType = TubeSpatialObjectPoint< TDimension > >
44  public PointBasedSpatialObject< TDimension >
45 {
46 public:
47 
52  typedef double ScalarType;
53  typedef TTubePointType TubePointType;
54  typedef std::vector< TubePointType > PointListType;
56  typedef typename Superclass::PointType PointType;
64 
66  itkNewMacro(Self);
67 
70 
72  virtual PointListType & GetPoints(void);
73 
75  virtual const PointListType & GetPoints(void) const;
76 
78  virtual void SetPoints(PointListType & newPoints);
79 
81  virtual const SpatialObjectPointType * GetPoint(IdentifierType ind) const
82  { return &( m_Points[ind] ); }
83 
86  { return &( m_Points[ind] ); }
87 
89  virtual void SetPoint(IdentifierType ind, const TubePointType & pnt)
90  { m_Points[ind] = pnt; }
91 
93  virtual void RemovePoint(IdentifierType ind)
94  { m_Points.erase(m_Points.begin() + ind); }
95 
97  virtual SizeValueType GetNumberOfPoints(void) const
98  { return m_Points.size(); }
99 
101  itkSetMacro(EndType, unsigned int);
102  itkGetConstMacro(EndType, unsigned int);
103 
105  void Clear(void);
106 
108  bool ComputeTangentAndNormals(void);
109 
111  unsigned int RemoveDuplicatePoints(unsigned int step = 1);
112 
115  bool IsEvaluableAt(const PointType & point,
116  unsigned int depth = 0, char *name = NULL) const;
117 
122  bool ValueAt(const PointType & point, double & value,
123  unsigned int depth = 0, char *name = NULL) const;
124 
126  bool IsInside(const PointType & point,
127  unsigned int depth, char *name) const;
128 
132  virtual bool IsInside(const PointType & point) const;
133 
135  bool ComputeLocalBoundingBox() const;
136 
139  itkSetMacro(ParentPoint, int);
140  itkGetConstMacro(ParentPoint, int);
141 
144  itkSetMacro(Root, bool);
145  itkGetConstMacro(Root, bool);
146 
148  itkSetMacro(Artery, bool);
149  itkGetConstMacro(Artery, bool);
150 
152  void CopyInformation(const DataObject *data);
153 
154 protected:
156 
158 
159  unsigned int m_EndType;
160 
161  bool m_Root;
162  bool m_Artery;
163 
165  virtual ~TubeSpatialObject();
166 
168  virtual void PrintSelf(std::ostream & os, Indent indent) const;
169 
173 
174 private:
175  TubeSpatialObject(const Self &); //purposely not implemented
176  void operator=(const Self &); //purposely not implemented
177 };
178 } // end namespace itk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 #include "itkTubeSpatialObject.hxx"
182 #endif
183 
184 #endif // __itkTubeSpatialObject_h

Generated at Sat Mar 8 2014 15:39:36 for Orfeo Toolbox with doxygen 1.8.3.1