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 __itkAutoCropLabelMapFilter_h 00029 #define __itkAutoCropLabelMapFilter_h 00030 00031 #include "itkChangeRegionLabelMapFilter.h" 00032 00033 namespace itk 00034 { 00052 template< class TInputImage > 00053 class ITK_EXPORT AutoCropLabelMapFilter: 00054 public ChangeRegionLabelMapFilter< TInputImage > 00055 { 00056 public: 00058 typedef AutoCropLabelMapFilter Self; 00059 typedef ChangeRegionLabelMapFilter< TInputImage > Superclass; 00060 typedef SmartPointer< Self > Pointer; 00061 typedef SmartPointer< const Self > ConstPointer; 00062 00064 itkNewMacro(Self); 00065 00067 itkTypeMacro(AutoCropLabelMapFilter, ChangeRegionImageFilter); 00068 00070 typedef typename Superclass::OutputImageType OutputImageType; 00071 typedef typename Superclass::OutputImagePointer OutputImagePointer; 00072 typedef typename Superclass::OutputImageRegionType OutputImageRegionType; 00073 typedef typename Superclass::OutputImagePixelType OutputImagePixelType; 00074 00076 typedef TInputImage InputImageType; 00077 typedef typename InputImageType::Pointer InputImagePointer; 00078 typedef typename InputImageType::ConstPointer InputImageConstPointer; 00079 typedef typename InputImageType::RegionType InputImageRegionType; 00080 typedef typename InputImageType::PixelType InputImagePixelType; 00081 typedef typename InputImageType::LabelObjectType LabelObjectType; 00082 00083 typedef typename InputImageType::PixelType PixelType; 00084 typedef typename InputImageType::IndexType IndexType; 00085 typedef typename InputImageType::SizeType SizeType; 00086 typedef typename InputImageType::RegionType RegionType; 00087 00088 typedef TInputImage TOutputImage; 00089 00091 itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension); 00092 itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension); 00093 itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension); 00095 00099 itkSetMacro(CropBorder, SizeType); 00100 itkGetConstReferenceMacro(CropBorder, SizeType); 00102 00103 protected: 00104 AutoCropLabelMapFilter(); 00105 ~AutoCropLabelMapFilter() {} 00106 00107 void PrintSelf(std::ostream & os, Indent indent) const; 00108 00109 virtual void GenerateOutputInformation(); 00110 00111 private: 00112 AutoCropLabelMapFilter(const Self &); //purposely not implemented 00113 void operator=(const Self &); //purposely not implemented 00114 00115 SizeType m_CropBorder; 00116 }; 00117 } // end namespace itk 00118 00119 #ifndef ITK_MANUAL_INSTANTIATION 00120 #include "itkAutoCropLabelMapFilter.hxx" 00121 #endif 00122 00123 #endif 00124