Orfeo Toolbox  4.0
itkMeshSpatialObject.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 __itkMeshSpatialObject_h
19 #define __itkMeshSpatialObject_h
20 
21 #include "itkMesh.h"
22 #include "itkSpatialObject.h"
23 
24 namespace itk
25 {
36 template< typename TMesh = Mesh< int > >
38  public SpatialObject< TMesh::PointDimension >
39 {
40 public:
41 
42  typedef double ScalarType;
44 
45  itkStaticConstMacro(Dimension, unsigned int, TMesh::PointDimension);
46 
50 
51  typedef TMesh MeshType;
52  typedef typename MeshType::Pointer MeshPointer;
54  typedef typename Superclass::PointType PointType;
56 
59 
61  itkNewMacro(Self);
62 
64  itkTypeMacro(MeshSpatialObject, SpatialObject);
65 
67  void SetMesh(MeshType *Mesh);
68 
70  MeshType * GetMesh(void);
71  const MeshType *GetMesh(void) const;
72 
75  bool IsEvaluableAt(const PointType & point,
76  unsigned int depth = 0, char *name = NULL) const;
77 
81  bool ValueAt(const PointType & point, double & value,
82  unsigned int depth = 0, char *name = NULL) const;
83 
85  bool IsInside(const PointType & point,
86  unsigned int depth, char *name) const;
87 
91  virtual bool IsInside(const PointType & point) const;
92 
94  bool ComputeLocalBoundingBox() const;
95 
97  ModifiedTimeType GetMTime(void) const;
98 
100  const char * GetPixelType()
101  {
102  return m_PixelType.c_str();
103  }
104 
111  itkSetMacro(IsInsidePrecision, double);
112  itkGetMacro(IsInsidePrecision, double);
113 
114 protected:
115 
117  std::string m_PixelType;
119 
121  virtual ~MeshSpatialObject();
122 
123  void PrintSelf(std::ostream & os, Indent indent) const;
124 };
125 } // end of namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkMeshSpatialObject.hxx"
129 #endif
130 
131 #endif //__itkMeshSpatialObject_h

Generated at Sat Mar 8 2014 15:12:50 for Orfeo Toolbox with doxygen 1.8.3.1