ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkPlaneSpatialObject.h
Go to the documentation of this file.
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 __itkPlaneSpatialObject_h
00019 #define __itkPlaneSpatialObject_h
00020 
00021 #include "itkSpatialObject.h"
00022 #include "itkAffineTransform.h"
00023 
00024 namespace itk
00025 {
00036 template< unsigned int TDimension = 3  >
00037 class ITK_EXPORT PlaneSpatialObject:
00038   public SpatialObject< TDimension >
00039 {
00040 public:
00041 
00043   typedef PlaneSpatialObject                           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 VectorContainer< IdentifierType, PointType > PointContainerType;
00052   typedef SmartPointer< PointContainerType >           PointContainerPointer;
00053   typedef typename Superclass::BoundingBoxType         BoundingBoxType;
00054 
00055   itkStaticConstMacro(NumberOfDimension, unsigned int,
00056                       TDimension);
00057 
00058   itkNewMacro(Self);
00059   itkTypeMacro(PlaneSpatialObject, SpatialObject);
00060 
00063   virtual bool ValueAt(const PointType & point, double & value,
00064                        unsigned int depth = 0, char *name = NULL) const;
00065 
00068   virtual bool IsEvaluableAt(const PointType & point,
00069                              unsigned int depth = 0, char *name = NULL) const;
00070 
00072   virtual bool IsInside(const PointType & point,
00073                         unsigned int depth, char *name) const;
00074 
00078   virtual bool IsInside(const PointType & point) const;
00079 
00083   virtual bool ComputeLocalBoundingBox() const;
00084 
00085   itkSetMacro(LowerPoint, PointType);
00086   itkSetMacro(UpperPoint, PointType);
00087   itkGetMacro(LowerPoint, PointType);
00088   itkGetMacro(UpperPoint, PointType);
00089 protected:
00090   PlaneSpatialObject(const Self &); //purposely not implemented
00091   void operator=(const Self &);     //purposely not implemented
00092 
00093   PlaneSpatialObject(void);
00094   ~PlaneSpatialObject(void);
00095 
00096   PointType m_LowerPoint;
00097   PointType m_UpperPoint;
00098 
00100   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00101 };
00102 } // end namespace itk
00103 
00104 #ifndef ITK_MANUAL_INSTANTIATION
00105 #include "itkPlaneSpatialObject.hxx"
00106 #endif
00107 
00108 #endif // __itkPlaneSpatialObject_h
00109