ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkLevelSetDomainPartitionImageBase.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 __itkLevelSetDomainPartitionImageBase_h
00019 #define __itkLevelSetDomainPartitionImageBase_h
00020 
00021 #include "itkLevelSetDomainPartitionBase.h"
00022 #include "itkImageRegionIteratorWithIndex.h"
00023 
00024 namespace itk
00025 {
00031 template< class TImage >
00032 class LevelSetDomainPartitionImageBase : public LevelSetDomainPartitionBase< TImage >
00033 {
00034 public:
00035 
00036   typedef LevelSetDomainPartitionImageBase      Self;
00037   typedef LevelSetDomainPartitionBase< TImage > Superclass;
00038   typedef SmartPointer< Self >                  Pointer;
00039   typedef SmartPointer< const Self >            ConstPointer;
00040 
00041   itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension);
00042 
00043   itkTypeMacro( LevelSetDomainPartitionImageBase, LevelSetDomainPartitionBase );
00044 
00045   typedef TImage                             ImageType;
00046   typedef typename ImageType::Pointer        ImagePointer;
00047   typedef typename ImageType::ConstPointer   ImageConstPointer;
00048   typedef typename ImageType::PixelType      PixelType;
00049   typedef typename ImageType::RegionType     RegionType;
00050   typedef typename ImageType::SizeType       SizeType;
00051   typedef typename SizeType::SizeValueType   SizeValueType;
00052   typedef typename ImageType::SpacingType    SpacingType;
00053   typedef typename ImageType::IndexType      IndexType;
00054   typedef typename IndexType::IndexValueType IndexValueType;
00055   typedef typename ImageType::PointType      PointType;
00056 
00057   typedef typename Superclass::IdentifierListType IdentifierListType;
00058 
00059   typedef Image< IdentifierListType, ImageDimension >   ListImageType;
00060   typedef typename ListImageType::Pointer               ListImagePointer;
00061   typedef typename ListImageType::ConstPointer          ListImageConstPointer;
00062   typedef typename ListImageType::RegionType            ListRegionType;
00063   typedef typename ListImageType::SizeType              ListSizeType;
00064   typedef typename ListSizeType::SizeValueType          ListSizeValueType;
00065   typedef typename ListImageType::SpacingType           ListSpacingType;
00066   typedef typename ListImageType::IndexType             ListIndexType;
00067   typedef typename ListIndexType::IndexValueType        ListIndexValueType;
00068   typedef typename ListImageType::PointType             ListPointType;
00069   typedef ImageRegionIteratorWithIndex< ListImageType > ListIteratorType;
00070 
00073   itkSetConstObjectMacro( Image, ImageType );
00074   itkGetConstObjectMacro( Image, ImageType );
00076 
00078   itkGetConstObjectMacro( ListDomain, ListImageType );
00079 
00080 protected:
00081   LevelSetDomainPartitionImageBase();
00082   virtual ~LevelSetDomainPartitionImageBase();
00083 
00086   virtual void PopulateListDomain();
00087 
00090   void AllocateListDomain();
00091 
00092 private:
00093   LevelSetDomainPartitionImageBase(const Self &); //purposely not implemented
00094   void operator=(const Self &); //purposely not implemented
00095 
00096   ImageConstPointer     m_Image;
00097   ListImagePointer      m_ListDomain;
00098 
00099 };
00100 } //end namespace itk
00101 
00102 #ifndef ITK_MANUAL_INSTANTIATION
00103 #include "itkLevelSetDomainPartitionImageBase.hxx"
00104 #endif
00105 
00106 #endif
00107