ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkBoxSpatialObject.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 __itkBoxSpatialObject_h
19 #define __itkBoxSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkAffineTransform.h"
23 #include "itkFixedArray.h"
24 
25 namespace itk
26 {
35 template< unsigned int TDimension = 3 >
36 class ITK_EXPORT BoxSpatialObject:
37  public SpatialObject< TDimension >
38 {
39 public:
40 
42  typedef double ScalarType;
47  typedef typename Superclass::PointType PointType;
48  typedef typename Superclass::TransformType TransformType;
49  typedef typename Superclass::BoundingBoxType BoundingBoxType;
52 
53  itkNewMacro(Self);
54  itkTypeMacro(BoxSpatialObject, SpatialObject);
55 
57  itkSetMacro(Size, SizeType);
58  itkGetConstReferenceMacro(Size, SizeType);
60 
63  virtual bool ValueAt(const PointType & point, double & value,
64  unsigned int depth = 0,
65  char *name = NULL) const;
66 
69  virtual bool IsEvaluableAt(const PointType & point,
70  unsigned int depth = 0,
71  char *name = NULL) const;
72 
74  virtual bool IsInside(const PointType & point,
75  unsigned int depth,
76  char *) const;
77 
81  virtual bool IsInside(const PointType & point) const;
82 
86  virtual bool ComputeLocalBoundingBox() const;
87 
88 protected:
89  BoxSpatialObject(const Self &); //purposely not implemented
90  void operator=(const Self &); //purposely not implemented
91 
92  BoxSpatialObject(void);
93  ~BoxSpatialObject(void);
94 
96 
98  virtual void PrintSelf(std::ostream & os, Indent indent) const;
99 };
100 } // end namespace itk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "itkBoxSpatialObject.hxx"
104 #endif
105 
106 #endif // __itkBoxSpatialObject_h
107