ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkCylinderSpatialObject_h 00019 #define __itkCylinderSpatialObject_h 00020 00021 #include "itkSpatialObject.h" 00022 #include "itkAffineTransform.h" 00023 #include "itkFixedArray.h" 00024 00025 namespace itk 00026 { 00032 class ITK_EXPORT CylinderSpatialObject: 00033 public SpatialObject< 3 > 00034 { 00035 public: 00036 00037 typedef CylinderSpatialObject Self; 00038 typedef double ScalarType; 00039 typedef SmartPointer< Self > Pointer; 00040 typedef SmartPointer< const Self > ConstPointer; 00041 typedef SpatialObject< 3 > Superclass; 00042 typedef SmartPointer< Superclass > SuperclassPointer; 00043 typedef Superclass::PointType PointType; 00044 typedef Superclass::TransformType TransformType; 00045 typedef Superclass::BoundingBoxType BoundingBoxType; 00046 typedef VectorContainer< IdentifierType, PointType > PointContainerType; 00047 typedef SmartPointer< PointContainerType > PointContainerPointer; 00048 00049 itkStaticConstMacro(NumberOfDimension, unsigned int, 00050 3); 00051 00052 itkNewMacro(Self); 00053 itkTypeMacro(CylinderSpatialObject, SpatialObject); 00054 00056 itkSetMacro(Radius, double); 00057 itkGetConstReferenceMacro(Radius, double); 00059 00061 itkSetMacro(Height, double); 00062 itkGetConstReferenceMacro(Height, double); 00064 00067 virtual bool ValueAt(const PointType & point, double & value, 00068 unsigned int depth = 0, 00069 char *name = NULL) const; 00070 00073 virtual bool IsEvaluableAt(const PointType & point, 00074 unsigned int depth = 0, 00075 char *name = NULL) const; 00076 00078 virtual bool IsInside(const PointType & point, 00079 unsigned int depth, 00080 char *) const; 00081 00085 virtual bool IsInside(const PointType & point) const; 00086 00090 virtual bool ComputeLocalBoundingBox() const; 00091 00092 protected: 00093 CylinderSpatialObject(const Self &); //purposely not implemented 00094 void operator=(const Self &); //purposely not implemented 00095 00096 CylinderSpatialObject(void); 00097 ~CylinderSpatialObject(void); 00098 00099 double m_Radius; 00100 double m_Height; 00101 00103 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00104 }; 00105 } // end namespace itk 00106 00107 #endif // __itkCylinderSpatialObject_h 00108