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 /*========================================================================= 00019 * 00020 * Portions of this file are subject to the VTK Toolkit Version 3 copyright. 00021 * 00022 * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00023 * 00024 * For complete copyright, license and disclaimer of warranty information 00025 * please refer to the NOTICE file at the top of the ITK source tree. 00026 * 00027 *=========================================================================*/ 00028 #ifndef __itkPadLabelMapFilter_h 00029 #define __itkPadLabelMapFilter_h 00030 00031 #include "itkChangeRegionLabelMapFilter.h" 00032 00033 namespace itk 00034 { 00054 template< class TInputImage > 00055 class ITK_EXPORT PadLabelMapFilter:public ChangeRegionLabelMapFilter< TInputImage > 00056 { 00057 public: 00059 typedef PadLabelMapFilter Self; 00060 typedef ChangeRegionLabelMapFilter< TInputImage > Superclass; 00061 typedef SmartPointer< Self > Pointer; 00062 typedef SmartPointer< const Self > ConstPointer; 00063 00065 itkTypeMacro(PadLabelMapFilter, ChangeRegionImageFilter); 00066 00068 itkNewMacro(Self); 00069 00071 typedef typename Superclass::OutputImageType OutputImageType; 00072 typedef typename Superclass::OutputImagePointer OutputImagePointer; 00073 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00074 typedef typename Superclass::OutputImagePixelType OutputImagePixelType; 00075 00077 typedef TInputImage InputImageType; 00078 typedef typename InputImageType::Pointer InputImagePointer; 00079 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00080 typedef typename InputImageType::RegionType InputImageRegionType; 00081 typedef typename InputImageType::PixelType InputImagePixelType; 00082 typedef typename InputImageType::LabelObjectType LabelObjectType; 00083 00084 typedef typename InputImageType::PixelType PixelType; 00085 typedef typename InputImageType::IndexType IndexType; 00086 typedef typename InputImageType::SizeType SizeType; 00087 typedef typename InputImageType::RegionType RegionType; 00088 00089 typedef TInputImage TOutputImage; 00090 00092 itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension); 00093 itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); 00094 itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension); 00096 00098 itkSetMacro(UpperBoundaryPadSize, SizeType); 00099 itkGetMacro(UpperBoundaryPadSize, SizeType); 00100 itkSetMacro(LowerBoundaryPadSize, SizeType); 00101 itkGetMacro(LowerBoundaryPadSize, SizeType); 00103 00104 void SetPadSize(const SizeType & size) 00105 { 00106 this->SetUpperBoundaryPadSize(size); 00107 this->SetLowerBoundaryPadSize(size); 00108 } 00109 00110 protected: 00111 PadLabelMapFilter() 00112 { 00113 m_UpperBoundaryPadSize.Fill(0); 00114 m_LowerBoundaryPadSize.Fill(0); 00115 } 00116 00117 ~PadLabelMapFilter() {} 00118 00119 virtual void GenerateOutputInformation(); 00120 00121 void PrintSelf(std::ostream & os, Indent indent) const; 00122 00123 private: 00124 PadLabelMapFilter(const Self &); //purposely not implemented 00125 void operator=(const Self &); //purposely not implemented 00126 00127 SizeType m_UpperBoundaryPadSize; 00128 SizeType m_LowerBoundaryPadSize; 00129 }; 00130 } // end namespace itk 00131 00132 #ifndef ITK_MANUAL_INSTANTIATION 00133 #include "itkPadLabelMapFilter.hxx" 00134 #endif 00135 00136 #endif 00137