Orfeo Toolbox  3.16
itkMeshSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkMeshSpatialObject.h,v $
5  Language: C++
6  Date: $Date: 2009-04-07 14:34:04 $
7  Version: $Revision: 1.8 $
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 __itkMeshSpatialObject_h
19 #define __itkMeshSpatialObject_h
20 
21 #include "itkMesh.h"
22 #include "itkExceptionObject.h"
23 #include "itkSpatialObject.h"
24 
25 namespace itk
26 {
27 
37 template <class TMesh = Mesh<int> >
39 : public SpatialObject< ::itk::GetMeshDimension<TMesh>::PointDimension >
40 {
41 
42 public:
43 
44  typedef double ScalarType;
46 
47  itkStaticConstMacro(Dimension, unsigned int,TMesh::PointDimension);
48 
52 
53  typedef TMesh MeshType;
54  typedef typename MeshType::Pointer MeshPointer;
56  typedef typename Superclass::PointType PointType;
57  typedef typename Superclass::BoundingBoxType BoundingBoxType;
58 
61 
63  itkNewMacro( Self );
64 
66  itkTypeMacro( MeshSpatialObject, SpatialObject );
67 
69  void SetMesh( MeshType * Mesh );
70 
72  MeshType * GetMesh( void );
73 
76  bool IsEvaluableAt( const PointType & point,
77  unsigned int depth=0, char *name=NULL) const;
78 
82  bool ValueAt( const PointType & point, double & value,
83  unsigned int depth=0, char *name=NULL) const;
84 
86  bool IsInside( const PointType & point,
87  unsigned int depth, char *name) const;
88 
92  virtual bool IsInside( const PointType & point) const;
93 
95  bool ComputeLocalBoundingBox() const;
96 
98  unsigned long GetMTime( void ) const;
99 
101  const char* GetPixelType()
102  {
103  return m_PixelType.c_str();
104  }
105 
112  itkSetMacro(IsInsidePrecision, double);
113  itkGetMacro(IsInsidePrecision, double);
114 
115 protected:
116 
118  std::string m_PixelType;
120 
122  virtual ~MeshSpatialObject();
123 
124  void PrintSelf( std::ostream& os, Indent indent ) const;
125 
126 };
127 
128 } // end of namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 #include "itkMeshSpatialObject.txx"
132 #endif
133 
134 #endif //__itkMeshSpatialObject_h

Generated at Sat Feb 2 2013 23:52:43 for Orfeo Toolbox with doxygen 1.8.1.1