ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkCylinderSpatialObject.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 __itkCylinderSpatialObject_h
19 #define __itkCylinderSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 #include "itkAffineTransform.h"
23 #include "itkFixedArray.h"
24 
25 namespace itk
26 {
32 class ITK_EXPORT CylinderSpatialObject:
33  public SpatialObject< 3 >
34 {
35 public:
36 
38  typedef double ScalarType;
43  typedef Superclass::PointType PointType;
44  typedef Superclass::TransformType TransformType;
45  typedef Superclass::BoundingBoxType BoundingBoxType;
48 
49  itkStaticConstMacro(NumberOfDimension, unsigned int,
50  3);
51 
52  itkNewMacro(Self);
53  itkTypeMacro(CylinderSpatialObject, SpatialObject);
54 
56  itkSetMacro(Radius, double);
57  itkGetConstReferenceMacro(Radius, double);
59 
61  itkSetMacro(Height, double);
62  itkGetConstReferenceMacro(Height, double);
64 
67  virtual bool ValueAt(const PointType & point, double & value,
68  unsigned int depth = 0,
69  char *name = NULL) const;
70 
73  virtual bool IsEvaluableAt(const PointType & point,
74  unsigned int depth = 0,
75  char *name = NULL) const;
76 
78  virtual bool IsInside(const PointType & point,
79  unsigned int depth,
80  char *) const;
81 
85  virtual bool IsInside(const PointType & point) const;
86 
90  virtual bool ComputeLocalBoundingBox() const;
91 
92 protected:
93  CylinderSpatialObject(const Self &); //purposely not implemented
94  void operator=(const Self &); //purposely not implemented
95 
97  ~CylinderSpatialObject(void);
98 
99  double m_Radius;
100  double m_Height;
101 
103  virtual void PrintSelf(std::ostream & os, Indent indent) const;
104 };
105 } // end namespace itk
106 
107 #endif // __itkCylinderSpatialObject_h
108