ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkLabelMapToLabelImageFilter.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 __itkLabelMapToLabelImageFilter_h
00019 #define __itkLabelMapToLabelImageFilter_h
00020 
00021 #include "itkLabelMapFilter.h"
00022 
00023 namespace itk
00024 {
00045 template< class TInputImage, class TOutputImage >
00046 class ITK_EXPORT LabelMapToLabelImageFilter:
00047   public LabelMapFilter< TInputImage, TOutputImage >
00048 {
00049 public:
00051   typedef LabelMapToLabelImageFilter                  Self;
00052   typedef LabelMapFilter< TInputImage, TOutputImage > Superclass;
00053   typedef SmartPointer< Self >                        Pointer;
00054   typedef SmartPointer< const Self >                  ConstPointer;
00055 
00057   typedef TInputImage                              InputImageType;
00058   typedef TOutputImage                             OutputImageType;
00059   typedef typename InputImageType::Pointer         InputImagePointer;
00060   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00061   typedef typename InputImageType::RegionType      InputImageRegionType;
00062   typedef typename InputImageType::PixelType       InputImagePixelType;
00063   typedef typename InputImageType::LabelObjectType LabelObjectType;
00064 
00065   typedef typename OutputImageType::Pointer      OutputImagePointer;
00066   typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00067   typedef typename OutputImageType::RegionType   OutputImageRegionType;
00068   typedef typename OutputImageType::PixelType    OutputImagePixelType;
00069   typedef typename OutputImageType::IndexType    IndexType;
00070 
00072   itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
00073   itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
00075 
00077   itkNewMacro(Self);
00078 
00080   itkTypeMacro(LabelMapToLabelImageFilter, ImageToImageFilter);
00081 
00082 #ifdef ITK_USE_CONCEPT_CHECKING
00083   itkConceptMacro( SameDimensionCheck,
00084                    ( Concept::SameDimension< InputImageDimension, OutputImageDimension > ) );
00085 #endif
00086 protected:
00087   LabelMapToLabelImageFilter();
00088   ~LabelMapToLabelImageFilter() {}
00089 
00090   virtual void BeforeThreadedGenerateData();
00091 
00092   virtual void ThreadedProcessLabelObject(LabelObjectType *labelObject);
00093 
00094 private:
00095   LabelMapToLabelImageFilter(const Self &); //purposely not implemented
00096   void operator=(const Self &);             //purposely not implemented
00097 };                                          // end of class
00098 } // end namespace itk
00099 
00100 #ifndef ITK_MANUAL_INSTANTIATION
00101 #include "itkLabelMapToLabelImageFilter.hxx"
00102 #endif
00103 
00104 #endif
00105