Orfeo Toolbox  3.16
itkBlobSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkBlobSpatialObject.h,v $
5  Language: C++
6  Date: $Date: 2009-04-07 14:33:56 $
7  Version: $Revision: 1.30 $
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 __itkBlobSpatialObject_h
19 #define __itkBlobSpatialObject_h
20 
21 #include <list>
22 
24 #include "itkSpatialObjectPoint.h"
25 
26 namespace itk
27 {
28 
42 template < unsigned int TDimension = 3 >
44  :public PointBasedSpatialObject< TDimension >
45 {
46 
47 public:
48 
53  typedef double ScalarType;
55  typedef std::vector< BlobPointType > PointListType;
56  typedef typename Superclass::PointType PointType;
57  typedef typename Superclass::SpatialObjectPointType SpatialObjectPointType;
59  typedef typename Superclass::BoundingBoxType BoundingBoxType;
62 
64  itkNewMacro( Self );
65 
67  itkTypeMacro( BlobSpatialObject, SpatialObject );
68 
70  PointListType & GetPoints( void );
71 
73  const PointListType & GetPoints( void ) const;
74 
76  void SetPoints( PointListType & newPoints );
77 
79  const SpatialObjectPointType* GetPoint(unsigned long id) const
80  {
81  return &(m_Points[id]);
82  }
83 
85  SpatialObjectPointType* GetPoint(unsigned long id) {return &(m_Points[id]);}
86 
88  unsigned long GetNumberOfPoints(void) const {return m_Points.size();}
89 
92  bool IsEvaluableAt( const PointType & point,
93  unsigned int depth=0, char * name=NULL ) const;
94 
99  bool ValueAt( const PointType & point, double & value,
100  unsigned int depth=0, char * name=NULL ) const;
101 
103  bool IsInside( const PointType & point,
104  unsigned int depth, char * name) const;
105 
109  bool IsInside( const PointType & point) const;
110 
112  bool ComputeLocalBoundingBox() const;
113 
114 protected:
115  BlobSpatialObject(const Self&); //purposely not implemented
116  void operator=(const Self&); //purposely not implemented
117 
119 
121  virtual ~BlobSpatialObject();
122 
124  virtual void PrintSelf( std::ostream& os, Indent indent ) const;
125 };
126 
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkBlobSpatialObject.txx"
131 #endif
132 
133 #endif // __itkBlobSpatialObject_h

Generated at Sat Feb 2 2013 23:29:24 for Orfeo Toolbox with doxygen 1.8.1.1