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

itkLabelImageToLabelMapFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkLabelImageToLabelMapFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-07-08 15:58:33 $
00007   Version:   $Revision: 1.4 $
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      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkLabelImageToLabelMapFilter_h
00018 #define __itkLabelImageToLabelMapFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkLabelMap.h"
00022 #include "itkLabelObject.h"
00023 
00024 namespace itk {
00025 
00041 template<class TInputImage, class TOutputImage=LabelMap< LabelObject< typename TInputImage::PixelType, ::itk::GetImageDimension<TInputImage>::ImageDimension > > >
00042 class ITK_EXPORT LabelImageToLabelMapFilter : 
00043     public ImageToImageFilter<TInputImage, TOutputImage>
00044 {
00045 public:
00047   typedef LabelImageToLabelMapFilter                    Self;
00048   typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00049   typedef SmartPointer<Self>                            Pointer;
00050   typedef SmartPointer<const Self>                      ConstPointer;
00051 
00053   typedef TInputImage                              InputImageType;
00054   typedef TOutputImage                             OutputImageType;
00055   typedef typename InputImageType::Pointer         InputImagePointer;
00056   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00057   typedef typename InputImageType::RegionType      InputImageRegionType;
00058   typedef typename InputImageType::PixelType       InputImagePixelType;
00059   typedef typename InputImageType::IndexType       IndexType;
00060 
00061   typedef typename OutputImageType::Pointer         OutputImagePointer;
00062   typedef typename OutputImageType::ConstPointer    OutputImageConstPointer;
00063   typedef typename OutputImageType::RegionType      OutputImageRegionType;
00064   typedef typename OutputImageType::PixelType       OutputImagePixelType;
00065   typedef typename OutputImageType::LabelObjectType LabelObjectType;
00066   
00068   itkStaticConstMacro(InputImageDimension, unsigned int,
00069                       TInputImage::ImageDimension);
00070   itkStaticConstMacro(OutputImageDimension, unsigned int,
00071                       TOutputImage::ImageDimension);
00073 
00075   itkNewMacro(Self);  
00076 
00078   itkTypeMacro(LabelImageToLabelMapFilter, 
00079                ImageToImageFilter);
00080 
00085   itkSetMacro(BackgroundValue, OutputImagePixelType);
00086   itkGetConstMacro(BackgroundValue, OutputImagePixelType);
00088 
00089 protected:
00090   LabelImageToLabelMapFilter();
00091   ~LabelImageToLabelMapFilter() {};
00092   void PrintSelf(std::ostream& os, Indent indent) const;
00093 
00097   void GenerateInputRequestedRegion();
00098 
00100   void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output));
00101 
00102   virtual void BeforeThreadedGenerateData();
00103 
00104   virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId );
00105 
00106   virtual void AfterThreadedGenerateData();
00107   
00108 
00109 private:
00110   LabelImageToLabelMapFilter(const Self&); //purposely not implemented
00111   void operator=(const Self&); //purposely not implemented
00112 
00113   OutputImagePixelType m_BackgroundValue;
00114   
00115   typename std::vector< OutputImagePointer > m_TemporaryImages;
00116 
00117 }; // end of class
00118 
00119 } // end namespace itk
00120   
00121 #ifndef ITK_MANUAL_INSTANTIATION
00122 #include "itkLabelImageToLabelMapFilter.txx"
00123 #endif
00124 
00125 #endif
00126 

Generated at Mon Jul 12 2010 18:55:59 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000