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 __itkProjectionImageFilter_h 00019 #define __itkProjectionImageFilter_h 00020 00021 #include "itkImageToImageFilter.h" 00022 00023 namespace itk 00024 { 00054 template< class TInputImage, class TOutputImage, class TAccumulator > 00055 class ITK_EXPORT ProjectionImageFilter: 00056 public ImageToImageFilter< TInputImage, TOutputImage > 00057 { 00058 public: 00060 typedef ProjectionImageFilter Self; 00061 typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass; 00062 typedef SmartPointer< Self > Pointer; 00063 typedef SmartPointer< const Self > ConstPointer; 00064 00066 itkNewMacro(Self); 00067 00069 itkTypeMacro(ProjectionImageFilter, ImageToImageFilter); 00070 00072 typedef TInputImage InputImageType; 00073 typedef typename InputImageType::Pointer InputImagePointer; 00074 typedef typename InputImageType::RegionType InputImageRegionType; 00075 typedef typename InputImageType::PixelType InputImagePixelType; 00076 typedef TOutputImage OutputImageType; 00077 typedef typename OutputImageType::Pointer OutputImagePointer; 00078 typedef typename OutputImageType::RegionType OutputImageRegionType; 00079 typedef typename OutputImageType::PixelType OutputImagePixelType; 00080 00081 typedef TAccumulator AccumulatorType; 00082 00084 itkStaticConstMacro(InputImageDimension, unsigned int, 00085 TInputImage::ImageDimension); 00086 itkStaticConstMacro(OutputImageDimension, unsigned int, 00087 TOutputImage::ImageDimension); 00089 00092 #ifdef ITK_USE_CONCEPT_CHECKING 00093 00095 itkConceptMacro( ImageDimensionCheck, 00096 ( Concept::SameDimensionOrMinusOne< 00097 itkGetStaticConstMacro(InputImageDimension), 00098 itkGetStaticConstMacro(OutputImageDimension) > ) ); 00099 00101 #endif 00102 00105 itkSetMacro(ProjectionDimension, unsigned int); 00106 itkGetConstReferenceMacro(ProjectionDimension, unsigned int); 00107 protected: 00108 ProjectionImageFilter(); 00109 virtual ~ProjectionImageFilter() {} 00110 void PrintSelf(std::ostream & os, Indent indent) const; 00112 00114 virtual void GenerateOutputInformation(); 00115 00117 virtual void GenerateInputRequestedRegion(); 00118 00119 virtual void ThreadedGenerateData( 00120 const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId); 00121 00122 virtual AccumulatorType NewAccumulator( SizeValueType ) const; 00123 00124 private: 00125 ProjectionImageFilter(const Self &); //purposely not implemented 00126 void operator=(const Self &); //purposely not implemented 00127 00128 unsigned int m_ProjectionDimension; 00129 }; 00130 } // end namespace itk 00131 00132 #ifndef ITK_MANUAL_INSTANTIATION 00133 #include "itkProjectionImageFilter.hxx" 00134 #endif 00135 00136 #endif 00137