ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkImageMaskSpatialObject.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 __itkImageMaskSpatialObject_h
00019 #define __itkImageMaskSpatialObject_h
00020 
00021 #include "itkImageSpatialObject.h"
00022 #include "itkImageSliceConstIteratorWithIndex.h"
00023 
00024 namespace itk
00025 {
00037 template< unsigned int TDimension = 3 >
00038 class ITK_EXPORT ImageMaskSpatialObject:
00039   public ImageSpatialObject< TDimension, unsigned char >
00040 {
00041 public:
00042 
00043   typedef ImageMaskSpatialObject< TDimension > Self;
00044   typedef ImageSpatialObject< TDimension >     Superclass;
00045   typedef SmartPointer< Self >                 Pointer;
00046   typedef SmartPointer< const Self >           ConstPointer;
00047 
00048   typedef typename Superclass::ScalarType       ScalarType;
00049   typedef typename Superclass::PixelType        PixelType;
00050   typedef typename Superclass::ImageType        ImageType;
00051   typedef typename Superclass::ImagePointer     ImagePointer;
00052   typedef typename Superclass::IndexType        IndexType;
00053   typedef typename Superclass::RegionType       RegionType;
00054   typedef typename Superclass::SizeType         SizeType;
00055   typedef typename Superclass::TransformType    TransformType;
00056   typedef typename Superclass::PointType        PointType;
00057   typedef typename Superclass::BoundingBoxType  BoundingBoxType;
00058   typedef typename Superclass::InterpolatorType InterpolatorType;
00059 
00060   typedef itk::ImageSliceConstIteratorWithIndex< ImageType >
00061   SliceIteratorType;
00062 
00064   itkNewMacro(Self);
00065 
00067   itkTypeMacro(ImageMaskSpatialObject, ImageSpatialObject);
00068 
00070   bool IsInside(const PointType & point,
00071                 unsigned int depth, char *name) const;
00072 
00076   virtual bool IsInside(const PointType & point) const;
00077 
00085   RegionType GetAxisAlignedBoundingBoxRegion() const;
00086 
00087 protected:
00088   ImageMaskSpatialObject(const Self &); //purposely not implemented
00089   void operator=(const Self &);         //purposely not implemented
00090 
00091   ImageMaskSpatialObject();
00092   virtual ~ImageMaskSpatialObject();
00093 
00094   void PrintSelf(std::ostream & os, Indent indent) const;
00095 };
00096 } // end of namespace itk
00097 
00098 #ifndef ITK_MANUAL_INSTANTIATION
00099 #include "itkImageMaskSpatialObject.hxx"
00100 #endif
00101 
00102 #endif //__itkImageMaskSpatialObject_h
00103