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 __itkEllipseSpatialObject_h 00019 #define __itkEllipseSpatialObject_h 00020 00021 #include "itkSpatialObject.h" 00022 #include "itkAffineTransform.h" 00023 #include "itkFixedArray.h" 00024 00025 namespace itk 00026 { 00037 template< unsigned int TDimension = 3 > 00038 class ITK_EXPORT EllipseSpatialObject: 00039 public SpatialObject< TDimension > 00040 { 00041 public: 00042 00043 typedef EllipseSpatialObject Self; 00044 typedef double ScalarType; 00045 typedef SmartPointer< Self > Pointer; 00046 typedef SmartPointer< const Self > ConstPointer; 00047 typedef SpatialObject< TDimension > Superclass; 00048 typedef SmartPointer< Superclass > SuperclassPointer; 00049 typedef typename Superclass::PointType PointType; 00050 typedef typename Superclass::TransformType TransformType; 00051 typedef typename Superclass::BoundingBoxType BoundingBoxType; 00052 typedef VectorContainer< IdentifierType, PointType > PointContainerType; 00053 typedef SmartPointer< PointContainerType > PointContainerPointer; 00054 00055 typedef FixedArray< double, TDimension > ArrayType; 00056 itkStaticConstMacro(NumberOfDimension, unsigned int, 00057 TDimension); 00058 00059 itkNewMacro(Self); 00060 itkTypeMacro(EllipseSpatialObject, SpatialObject); 00061 00064 void SetRadius(double radius); 00065 00067 itkSetMacro(Radius, ArrayType); 00068 00070 itkGetConstReferenceMacro(Radius, ArrayType); 00071 00074 virtual bool ValueAt(const PointType & point, double & value, 00075 unsigned int depth = 0, 00076 char *name = NULL) const; 00077 00080 virtual bool IsEvaluableAt(const PointType & point, 00081 unsigned int depth = 0, 00082 char *name = NULL) const; 00083 00085 virtual bool IsInside(const PointType & point, 00086 unsigned int depth, 00087 char *) const; 00088 00092 virtual bool IsInside(const PointType & point) const; 00093 00097 virtual bool ComputeLocalBoundingBox() const; 00098 00100 void CopyInformation(const DataObject *data); 00101 00102 protected: 00103 EllipseSpatialObject(const Self &); //purposely not implemented 00104 void operator=(const Self &); //purposely not implemented 00105 00106 EllipseSpatialObject(void); 00107 ~EllipseSpatialObject(void); 00108 00109 ArrayType m_Radius; 00110 00112 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00113 }; 00114 } // end namespace itk 00115 00116 #ifndef ITK_MANUAL_INSTANTIATION 00117 #include "itkEllipseSpatialObject.hxx" 00118 #endif 00119 00120 #endif // __itkEllipseSpatialObject_h 00121