ANIMA  4.0
animaFDRCorrectImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkImageToImageFilter.h>
4 
5 namespace anima
6 {
7 
8 template <class PixelScalarType>
10 public itk::ImageToImageFilter< itk::Image<PixelScalarType, 3> , itk::Image <unsigned char, 3> >
11 {
12 public:
15  typedef itk::Image <PixelScalarType, 3> TInputImage;
16  typedef itk::Image <unsigned char, 3> TOutputImage;
17  typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass;
18  typedef itk::SmartPointer<Self> Pointer;
19  typedef itk::SmartPointer<const Self> ConstPointer;
20 
22  itkNewMacro(Self)
23 
24 
25  itkTypeMacro(FDRCorrectImageFilter, ImageToImageFilter)
26 
27  typedef typename TInputImage::Pointer InputImagePointer;
28  typedef typename TInputImage::PixelType InputImagePixel;
29  typedef typename TOutputImage::Pointer OutputImagePointer;
30 
31  typedef itk::Image <unsigned char, 3> MaskImageType;
32  typedef typename MaskImageType::Pointer MaskImagePointer;
33 
35  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
36 
37  itkSetMacro(MaskImage, MaskImagePointer)
38  itkSetMacro(QValue, double)
39  itkSetMacro(BYCorrection, bool)
40 
41 protected:
43  {
44  m_MaskImage = NULL;
45  m_QValue = 0.05;
46  m_BYCorrection = false;
47  }
48 
50 
51  void GenerateData() ITK_OVERRIDE;
52 
53 private:
54  ITK_DISALLOW_COPY_AND_ASSIGN(FDRCorrectImageFilter);
55 
56  void CreateFullMask();
57 
58  MaskImagePointer m_MaskImage;
59  double m_QValue;
60  bool m_BYCorrection;
61 };
62 
63 } // end of namespace anima
64 
FDRCorrectImageFilter< PixelScalarType > Self
itk::SmartPointer< const Self > ConstPointer
itk::Image< PixelScalarType, 3 > TInputImage
void BYCorrection(std::vector< double > &pvalues, double qValue)
itk::Image< unsigned char, 3 > TOutputImage
Superclass::OutputImageRegionType OutputImageRegionType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::Image< unsigned char, 3 > MaskImageType