ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLevelSetDenseImageBase.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 
00019 #ifndef __itkLevelSetDenseImageBase_h
00020 #define __itkLevelSetDenseImageBase_h
00021 
00022 #include "itkDiscreteLevelSetImageBase.h"
00023 
00024 namespace itk
00025 {
00040 template< class TImage >
00041 class LevelSetDenseImageBase :
00042   public DiscreteLevelSetImageBase< typename TImage::PixelType, TImage::ImageDimension >
00043   {
00044 public:
00045   typedef TImage                         ImageType;
00046   typedef typename ImageType::Pointer    ImagePointer;
00047   typedef typename ImageType::IndexType  IndexType;
00048   typedef typename ImageType::PixelType  PixelType;
00049   typedef typename ImageType::RegionType RegionType;
00051 
00052   typedef LevelSetDenseImageBase                                    Self;
00053   typedef SmartPointer< Self >                                      Pointer;
00054   typedef SmartPointer< const Self >                                ConstPointer;
00055   typedef DiscreteLevelSetImageBase< PixelType, ImageType::ImageDimension > Superclass;
00056 
00058   itkNewMacro ( Self );
00059 
00061   itkTypeMacro ( LevelSetDenseImageBase, DiscreteLevelSetImageBase );
00062 
00063   itkStaticConstMacro ( Dimension, unsigned int, Superclass::Dimension );
00064 
00065   typedef typename Superclass::InputType        InputType;
00066   typedef typename Superclass::OutputType       OutputType;
00067   typedef typename Superclass::OutputRealType   OutputRealType;
00068   typedef typename Superclass::GradientType     GradientType;
00069   typedef typename Superclass::HessianType      HessianType;
00070   typedef typename Superclass::LevelSetDataType LevelSetDataType;
00071 
00072   virtual void SetImage( ImageType* iImage );
00073   itkGetObjectMacro( Image, ImageType );
00074 
00076   virtual OutputType Evaluate( const InputType& iP ) const;
00077   virtual void Evaluate( const InputType& iP, LevelSetDataType& ioData ) const;
00079 
00080 protected:
00081   LevelSetDenseImageBase();
00082 
00083   virtual ~LevelSetDenseImageBase();
00084 
00085   ImagePointer m_Image;
00086 
00087   virtual bool IsInside( const InputType& iP ) const;
00088 
00090   virtual void Initialize();
00091 
00093   virtual void CopyInformation(const DataObject *data);
00094 
00096   virtual void Graft( const DataObject* data );
00097 
00098 private:
00099 
00100   LevelSetDenseImageBase( const Self& ); // purposely not implemented
00101   void operator = ( const Self& ); // purposely not implemented
00102   };
00103 }
00104 
00105 #ifndef ITK_MANUAL_INSTANTIATION
00106 #include "itkLevelSetDenseImageBase.hxx"
00107 #endif
00108 
00109 #endif // __itkLevelSetDenseImageBase_h
00110