ITK  4.13.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 {
33  public SpatialObject< 3 >
34 {
35 public:
36 
38  typedef double ScalarType;
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 = ITK_NULLPTR) const ITK_OVERRIDE;
70 
73  virtual bool IsEvaluableAt(const PointType & point,
74  unsigned int depth = 0,
75  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
76 
78  virtual bool IsInside(const PointType & point,
79  unsigned int depth,
80  char *) const ITK_OVERRIDE;
81 
85  virtual bool IsInside(const PointType & point) const;
86 
90  virtual bool ComputeLocalBoundingBox() const ITK_OVERRIDE;
91 
92 protected:
93  ITK_DISALLOW_COPY_AND_ASSIGN(CylinderSpatialObject);
94 
95  CylinderSpatialObject();
96  ~CylinderSpatialObject() ITK_OVERRIDE;
97 
98  double m_Radius;
99  double m_Height;
100 
102  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
103 };
104 } // end namespace itk
105 
106 #endif // itkCylinderSpatialObject_h
Point< ScalarType, VDimension > PointType
BoundingBox< IdentifierType, VDimension, ScalarType, VectorContainerType > BoundingBoxType
static const unsigned int NumberOfDimension
virtual bool IsInside(const PointType &point, unsigned int depth, char *) const override
virtual bool ValueAt(const PointType &point, double &value, unsigned int depth=0, char *name=nullptr) const override
virtual bool IsEvaluableAt(const PointType &point, unsigned int depth=0, char *name=nullptr) const override
SmartPointer< PointContainerType > PointContainerPointer
VectorContainer< IdentifierType, PointType > PointContainerType
Implementation of the composite pattern.
virtual bool ComputeLocalBoundingBox() const override
This class describe a cylinder in 3D only.
Superclass::BoundingBoxType BoundingBoxType
Superclass::TransformType TransformType
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, VDimension > TransformType
SmartPointer< const Self > ConstPointer
Base class for all data objects in ITK.
SmartPointer< Superclass > SuperclassPointer