Orfeo Toolbox  3.16
itkTubeSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkTubeSpatialObject.h,v $
5  Language: C++
6  Date: $Date: 2010-01-21 22:33:38 $
7  Version: $Revision: 1.48 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 
18 #ifndef __itkTubeSpatialObject_h
19 #define __itkTubeSpatialObject_h
20 
21 #include <list>
22 
25 
26 namespace itk
27 {
28 
41 template < unsigned int TDimension = 3,
42  typename TTubePointType = TubeSpatialObjectPoint<TDimension> >
44  :public PointBasedSpatialObject< TDimension >
45 {
46 
47 public:
48 
53  typedef double ScalarType;
54  typedef TTubePointType TubePointType;
55  typedef std::vector< TubePointType > PointListType;
57  typedef typename Superclass::PointType PointType;
59  typedef typename Superclass::SpatialObjectPointType SpatialObjectPointType;
63  typedef typename Superclass::CovariantVectorType CovariantVectorType;
64  typedef typename Superclass::BoundingBoxType BoundingBoxType;
65 
67  itkNewMacro( Self );
68 
71 
73  virtual PointListType & GetPoints( void );
74 
76  virtual const PointListType & GetPoints( void ) const;
77 
79  virtual void SetPoints( PointListType & newPoints );
80 
82  virtual const SpatialObjectPointType* GetPoint(unsigned long ind) const
83  {return &(m_Points[ind]);}
84 
86  virtual SpatialObjectPointType* GetPoint(unsigned long ind)
87  {return &(m_Points[ind]);}
88 
90  virtual void SetPoint(unsigned long ind, const TubePointType & pnt)
91  {m_Points[ind] = pnt;}
92 
94  virtual void RemovePoint(unsigned long ind)
95  {m_Points.erase(m_Points.begin()+ind);}
96 
98  virtual unsigned long GetNumberOfPoints(void) const
99  {return m_Points.size();}
100 
102  itkSetMacro(EndType,unsigned int);
103  itkGetConstMacro(EndType,unsigned int);
104 
106  void Clear( void );
107 
109  bool ComputeTangentAndNormals( void );
110 
112  unsigned int RemoveDuplicatePoints(unsigned int step=1);
113 
116  bool IsEvaluableAt( const PointType & point,
117  unsigned int depth=0, char * name=NULL ) const;
118 
123  bool ValueAt( const PointType & point, double & value,
124  unsigned int depth=0, char * name=NULL ) const;
125 
127  bool IsInside( const PointType & point,
128  unsigned int depth, char * name) const;
129 
133  virtual bool IsInside( const PointType & point) const;
134 
136  bool ComputeLocalBoundingBox( ) const;
137 
140  itkSetMacro(ParentPoint,int);
141  itkGetConstMacro(ParentPoint,int);
142 
145  itkSetMacro(Root, bool);
146  itkGetConstMacro(Root, bool);
147 
149  itkSetMacro(Artery, bool);
150  itkGetConstMacro(Artery, bool);
151 
153  void CopyInformation(const DataObject *data);
154 
155 
156 protected:
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 
171  mutable unsigned long m_OldMTime;
172  mutable unsigned long m_IndexToWorldTransformMTime;
173 
174 private:
175  TubeSpatialObject(const Self&); //purposely not implemented
176  void operator=(const Self&); //purposely not implemented
177 
178 };
179 
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkTubeSpatialObject.txx"
184 #endif
185 
186 #endif // __itkTubeSpatialObject_h

Generated at Sun Feb 3 2013 00:10:31 for Orfeo Toolbox with doxygen 1.8.1.1