00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ 00006 Version: $Revision: 18127 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __itkBrainMaskExtractionImageFilter_h_ 00019 #define __itkBrainMaskExtractionImageFilter_h_ 00020 00021 #include "itkImageToImageFilter.h" 00022 00023 namespace itk{ 00029 template< class TOutputImagePixelType > 00030 class BrainMaskExtractionImageFilter : 00031 public ImageToImageFilter< Image< unsigned short, 3 >, 00032 Image< TOutputImagePixelType, 3 > > 00033 { 00034 00035 public: 00036 00037 typedef BrainMaskExtractionImageFilter Self; 00038 typedef SmartPointer<Self> Pointer; 00039 typedef SmartPointer<const Self> ConstPointer; 00040 typedef ImageToImageFilter< Image< unsigned short, 3 >, 00041 Image< TOutputImagePixelType, 3 > > 00042 Superclass; 00043 00045 itkNewMacro(Self); 00046 00048 itkTypeMacro(BrainMaskExtractionImageFilter, 00049 ImageToImageFilter); 00050 00051 typedef unsigned short InputPixelType; 00052 00053 typedef TOutputImagePixelType OutputPixelType; 00054 00055 typedef typename Superclass::InputImageType InputImageType; 00056 typedef typename Superclass::OutputImageType OutputImageType; 00057 00058 typedef typename Superclass::OutputImageRegionType 00059 OutputImageRegionType; 00060 00061 protected: 00062 BrainMaskExtractionImageFilter(); 00063 ~BrainMaskExtractionImageFilter() {}; 00064 00065 void GenerateData(); 00066 00067 bool CompareImages( typename OutputImageType::Pointer im1, typename OutputImageType::Pointer im2); 00068 int ComputeHistogram( typename InputImageType::Pointer image); 00069 void CopyImage( typename OutputImageType::Pointer target, typename OutputImageType::Pointer source); 00070 }; 00071 00072 } 00073 00074 #ifndef ITK_MANUAL_INSTANTIATION 00075 #include "itkBrainMaskExtractionImageFilter.txx" 00076 #endif 00077 00078 #endif //__itkBrainMaskExtractionImageFilter_h_ 00079