Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkRegionFromReferenceLabelMapFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkRegionFromReferenceLabelMapFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-24 11:58:45 $
00007   Version:   $Revision: 1.2 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkRegionFromReferenceLabelMapFilter_h
00021 #define __itkRegionFromReferenceLabelMapFilter_h
00022 
00023 #include "itkChangeRegionLabelMapFilter.h"
00024 
00025 namespace itk
00026 {
00027   
00045 template <class TInputImage>
00046 class ITK_EXPORT RegionFromReferenceLabelMapFilter : public ChangeRegionLabelMapFilter<TInputImage>
00047 {
00048 public:
00050   typedef RegionFromReferenceLabelMapFilter        Self;
00051   typedef ChangeRegionLabelMapFilter<TInputImage>  Superclass;
00052   typedef SmartPointer<Self>                       Pointer;
00053   typedef SmartPointer<const Self>                 ConstPointer;
00054 
00055   
00057   itkTypeMacro(RegionFromReferenceLabelMapFilter, ChangeRegionImageFilter);
00058 
00060   itkNewMacro(Self);  
00061 
00063   typedef typename Superclass::OutputImageType       OutputImageType;
00064   typedef typename Superclass::OutputImagePointer    OutputImagePointer;
00065   typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00066   typedef typename Superclass::OutputImagePixelType  OutputImagePixelType;
00067 
00069   typedef TInputImage                              InputImageType;
00070   typedef typename InputImageType::Pointer         InputImagePointer;
00071   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00072   typedef typename InputImageType::RegionType      InputImageRegionType; 
00073   typedef typename InputImageType::PixelType       InputImagePixelType;
00074   typedef typename InputImageType::LabelObjectType LabelObjectType;
00075 
00076   typedef typename InputImageType::PixelType       PixelType;
00077   typedef typename InputImageType::IndexType       IndexType;
00078   typedef typename InputImageType::SizeType        SizeType;
00079   typedef typename InputImageType::RegionType      RegionType;
00080   
00081   typedef TInputImage TOutputImage;
00082   
00084   itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
00085   itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
00086   itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
00088 
00089   typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) >    ReferenceImageType;
00090 
00092   void SetReferenceImage ( const ReferenceImageType *image );
00093 
00094   const ReferenceImageType * GetReferenceImage() const;
00095 
00097   void SetInput1(const TInputImage *input)
00098     {
00099     this->SetInput( input );
00100     }
00101 
00103   void SetInput2(const ReferenceImageType *input)
00104     {
00105     this->SetReferenceImage( input );
00106     }
00107 
00108 
00109 protected:
00110   RegionFromReferenceLabelMapFilter()
00111     {
00112     this->SetNumberOfRequiredInputs(2);
00113     }
00114   ~RegionFromReferenceLabelMapFilter() {};
00115 
00116   virtual void GenerateOutputInformation();
00117 
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00119 
00120 private:
00121   RegionFromReferenceLabelMapFilter(const Self&); //purposely not implemented
00122   void operator=(const Self&); //purposely not implemented
00123 
00124 };
00125 
00126 } // end namespace itk
00127 
00128 #ifndef ITK_MANUAL_INSTANTIATION
00129 #include "itkRegionFromReferenceLabelMapFilter.txx"
00130 #endif
00131 
00132 #endif
00133 

Generated at Tue Sep 15 04:40:45 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000