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
itkRegularizedIVIMLocalVariationImageFilter.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 #ifndef __itkRegularizedIVIMLocalVariationImageFilter_h
18 #define __itkRegularizedIVIMLocalVariationImageFilter_h
19 
20 #include "itkImageToImageFilter.h"
21 #include "itkImage.h"
22 
23 namespace itk
24 {
25 
26  template<class TPixelType>
28  {
29  public:
30  static double Calc(TPixelType p)
31  {
32  return p*p;
33  }
34  };
35 
36  template<>
37  class IVIMSquaredEuclideanMetric<itk::Vector<double,3> >
38  {
39  public:
40  static double Calc(itk::Vector<double,3> p)
41  {
42  return p[1]*p[1];
43  }
44  };
45 
46  template<>
48  {
49  public:
51  {
52  return p.GetSquaredNorm();
53  }
54  };
55 
56  template<>
58  {
59  public:
61  {
62  return p.GetSquaredNorm();
63  }
64  };
65 
78 template <class TInputImage, class TOutputImage>
80  public ImageToImageFilter< TInputImage, TOutputImage >
81 {
82 public:
84  itkStaticConstMacro(InputImageDimension, unsigned int,
85  TInputImage::ImageDimension);
86  itkStaticConstMacro(OutputImageDimension, unsigned int,
87  TOutputImage::ImageDimension);
88 
90  typedef TInputImage InputImageType;
91  typedef TOutputImage OutputImageType;
92 
95  typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
98 
100  itkFactorylessNewMacro(Self)
101  itkCloneMacro(Self)
102 
104  itkTypeMacro(RegularizedIVIMLocalVariationImageFilter, ImageToImageFilter);
105 
107  typedef typename InputImageType::PixelType InputPixelType;
108  typedef typename OutputImageType::PixelType OutputPixelType;
109 
110  typedef typename InputImageType::RegionType InputImageRegionType;
111  typedef typename OutputImageType::RegionType OutputImageRegionType;
112 
113  typedef typename InputImageType::SizeType InputSizeType;
114 
121  virtual void GenerateInputRequestedRegion()
122  throw(InvalidRequestedRegionError);
123 
124 protected:
125  RegularizedIVIMLocalVariationImageFilter();
126  virtual ~RegularizedIVIMLocalVariationImageFilter() {}
127  void PrintSelf(std::ostream& os, Indent indent) const;
128 
139  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
140  ThreadIdType threadId );
141 
142 private:
143  RegularizedIVIMLocalVariationImageFilter(const Self&); //purposely not implemented
144  void operator=(const Self&); //purposely not implemented
145 };
146 
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
151 #endif
152 
153 #endif //RegularizedIVIMLocalVariationImageFilter
void PrintSelf(std::ostream &os, Indent indent) const
ImageToImageFilter< InputImageType, OutputImageType > Superclass
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
unsigned short PixelType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)