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 __itkMeanImageFilter_h 00019 #define __itkMeanImageFilter_h 00020 00021 #include "itkBoxImageFilter.h" 00022 #include "itkImage.h" 00023 #include "itkNumericTraits.h" 00024 00025 namespace itk 00026 { 00047 template< class TInputImage, class TOutputImage > 00048 class ITK_EXPORT MeanImageFilter: 00049 public BoxImageFilter< TInputImage, TOutputImage > 00050 { 00051 public: 00053 itkStaticConstMacro(InputImageDimension, unsigned int, 00054 TInputImage::ImageDimension); 00055 itkStaticConstMacro(OutputImageDimension, unsigned int, 00056 TOutputImage::ImageDimension); 00058 00060 typedef TInputImage InputImageType; 00061 typedef TOutputImage OutputImageType; 00062 00064 typedef MeanImageFilter Self; 00065 typedef BoxImageFilter< InputImageType, OutputImageType > Superclass; 00066 typedef SmartPointer< Self > Pointer; 00067 typedef SmartPointer< const Self > ConstPointer; 00068 00070 itkNewMacro(Self); 00071 00073 itkTypeMacro(MeanImageFilter, BoxImageFilter); 00074 00076 typedef typename InputImageType::PixelType InputPixelType; 00077 typedef typename OutputImageType::PixelType OutputPixelType; 00078 typedef typename NumericTraits< InputPixelType >::RealType InputRealType; 00079 00080 typedef typename InputImageType::RegionType InputImageRegionType; 00081 typedef typename OutputImageType::RegionType OutputImageRegionType; 00082 00083 typedef typename InputImageType::SizeType InputSizeType; 00084 00085 #ifdef ITK_USE_CONCEPT_CHECKING 00086 00087 itkConceptMacro( InputHasNumericTraitsCheck, 00088 ( Concept::HasNumericTraits< InputPixelType > ) ); 00089 00091 #endif 00092 protected: 00093 MeanImageFilter(); 00094 virtual ~MeanImageFilter() {} 00095 00106 void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, 00107 ThreadIdType threadId); 00108 00109 private: 00110 MeanImageFilter(const Self &); //purposely not implemented 00111 void operator=(const Self &); //purposely not implemented 00112 }; 00113 } // end namespace itk 00114 00115 #ifndef ITK_MANUAL_INSTANTIATION 00116 #include "itkMeanImageFilter.hxx" 00117 #endif 00118 00119 #endif 00120