Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkDwiNormilzationFilter.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 /*===================================================================
18 
19 This file is based heavily on a corresponding ITK filter.
20 
21 ===================================================================*/
22 #ifndef __itkDwiNormilzationFilter_h_
23 #define __itkDwiNormilzationFilter_h_
24 
25 #include "itkImageToImageFilter.h"
26 #include "itkVectorImage.h"
27 #include <itkLabelStatisticsImageFilter.h>
28 #include <itkImageRegionIteratorWithIndex.h>
29 #include <itkShiftScaleImageFilter.h>
31 
32 namespace itk{
37 template< class TInPixelType >
39  public ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > >
40 {
41 
42 public:
43 
47  typedef ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > > Superclass;
48 
50  itkFactorylessNewMacro(Self)
51  itkCloneMacro(Self)
52 
54  itkTypeMacro(DwiNormilzationFilter, ImageToImageFilter)
55 
56  typedef itk::Image< double, 3 > DoubleImageType;
57  typedef itk::Image< unsigned char, 3 > UcharImageType;
58  typedef itk::Image< unsigned short, 3 > BinImageType;
59  typedef itk::Image< TInPixelType, 3 > TInPixelImageType;
60  typedef typename Superclass::InputImageType InputImageType;
61  typedef typename Superclass::OutputImageType OutputImageType;
62  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
63  typedef mitk::DiffusionPropertyHelper::GradientDirectionType GradientDirectionType;
64  typedef mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer GradientContainerType;
65  typedef itk::LabelStatisticsImageFilter< TInPixelImageType,BinImageType > StatisticsFilterType;
66  typedef itk::Statistics::Histogram< typename TInPixelImageType::PixelType > HistogramType;
67  typedef typename HistogramType::MeasurementType MeasurementType;
68  typedef itk::ShiftScaleImageFilter<TInPixelImageType, DoubleImageType> ShiftScaleImageFilterType;
69 
70  itkSetMacro( GradientDirections, GradientContainerType )
71  itkSetMacro( ScalingFactor, TInPixelType )
72  itkSetMacro( UseGlobalReference, bool )
73  itkSetMacro( MaskImage, UcharImageType::Pointer )
74  itkSetMacro( Reference, double )
75 
76  protected:
77  DwiNormilzationFilter();
78  ~DwiNormilzationFilter() {}
79  void PrintSelf(std::ostream& os, Indent indent) const;
80 
82  void ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType);
83 
86  int m_B0Index;
87  TInPixelType m_ScalingFactor;
89  double m_Reference;
90 
91 };
92 
93 }
94 
95 #ifndef ITK_MANUAL_INSTANTIATION
97 #endif
98 
99 #endif //__itkDwiNormilzationFilter_h_
100 
void PrintSelf(std::ostream &os, Indent indent) const
itk::SmartPointer< Self > Pointer
ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > > Superclass
mitk::DiffusionPropertyHelper::GradientDirectionType GradientDirectionType
Superclass::InputImageType InputImageType
itk::Image< TInPixelType, 3 > TInPixelImageType
mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer GradientContainerType
HistogramType::MeasurementType MeasurementType
Normalizes the data vectors either using the specified reference value or the voxelwise baseline valu...
Superclass::OutputImageType OutputImageType
SmartPointer< const Self > ConstPointer
DataCollection - Class to facilitate loading/accessing structured data.
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType)
itk::Statistics::Histogram< typename TInPixelImageType::PixelType > HistogramType
itk::Image< unsigned short, 3 > BinImageType
itk::Image< unsigned char, 3 > UcharImageType
itk::ShiftScaleImageFilter< TInPixelImageType, DoubleImageType > ShiftScaleImageFilterType
class ITK_EXPORT Image
GradientContainerType m_GradientDirections
Superclass::OutputImageRegionType OutputImageRegionType
itk::Image< double, 3 > DoubleImageType
unsigned short PixelType
itk::LabelStatisticsImageFilter< TInPixelImageType, BinImageType > StatisticsFilterType
UcharImageType::Pointer m_MaskImage