ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkLabelMapToRGBImageFilter_h 00019 #define __itkLabelMapToRGBImageFilter_h 00020 00021 #include "itkLabelMapFilter.h" 00022 #include "itkLabelToRGBFunctor.h" 00023 #include "itkImage.h" 00024 #include "itkRGBPixel.h" 00025 00026 00027 namespace itk { 00028 00042 template<class TInputImage, class TOutputImage=Image< RGBPixel<unsigned char>, TInputImage::ImageDimension > > 00043 class ITK_EXPORT LabelMapToRGBImageFilter : 00044 public LabelMapFilter<TInputImage, TOutputImage> 00045 { 00046 public: 00048 typedef LabelMapToRGBImageFilter Self; 00049 typedef LabelMapFilter<TInputImage, TOutputImage> Superclass; 00050 typedef SmartPointer<Self> Pointer; 00051 typedef SmartPointer<const Self> ConstPointer; 00052 00054 typedef TInputImage InputImageType; 00055 typedef TOutputImage OutputImageType; 00056 typedef typename InputImageType::Pointer InputImagePointer; 00057 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00058 typedef typename InputImageType::RegionType InputImageRegionType; 00059 typedef typename InputImageType::PixelType InputImagePixelType; 00060 typedef typename InputImageType::LabelObjectType LabelObjectType; 00061 00062 typedef typename OutputImageType::Pointer OutputImagePointer; 00063 typedef typename OutputImageType::ConstPointer OutputImageConstPointer; 00064 typedef typename OutputImageType::RegionType OutputImageRegionType; 00065 typedef typename OutputImageType::PixelType OutputImagePixelType; 00066 typedef typename OutputImageType::IndexType IndexType; 00067 00068 typedef typename Functor::LabelToRGBFunctor< InputImagePixelType, OutputImagePixelType > FunctorType; 00069 00071 itkStaticConstMacro(InputImageDimension, unsigned int, 00072 TInputImage::ImageDimension); 00073 itkStaticConstMacro(OutputImageDimension, unsigned int, 00074 TOutputImage::ImageDimension); 00076 00078 itkNewMacro(Self); 00079 00081 itkTypeMacro(LabelMapToRGBImageFilter, 00082 ImageToImageFilter); 00083 00084 protected: 00085 LabelMapToRGBImageFilter(); 00086 ~LabelMapToRGBImageFilter() {}; 00087 00088 virtual void BeforeThreadedGenerateData(); 00089 00090 virtual void ThreadedProcessLabelObject( LabelObjectType * labelObject ); 00091 00092 virtual void GenerateOutputInformation(); 00093 00094 private: 00095 LabelMapToRGBImageFilter(const Self&); //purposely not implemented 00096 void operator=(const Self&); //purposely not implemented 00097 00098 }; // end of class 00099 00100 } // end namespace itk 00101 00102 #ifndef ITK_MANUAL_INSTANTIATION 00103 #include "itkLabelMapToRGBImageFilter.hxx" 00104 #endif 00105 00106 #endif 00107