Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkRegularizedIVIMReconstructionSingleIteration.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 __itkRegularizedIVIMReconstructionSingleIteration_h
18 #define __itkRegularizedIVIMReconstructionSingleIteration_h
19 
20 #include "itkImageToImageFilter.h"
21 #include "itkImage.h"
22 #include "itkVectorImage.h"
23 
24 namespace itk
25 {
38 template <class TInputPixel, class TOutputPixel, class TRefPixelType>
40  public ImageToImageFilter< itk::Image<itk::Vector<TInputPixel,3>, 3>, itk::Image<itk::Vector<TOutputPixel,3>, 3> >
41 {
42 public:
44  typedef itk::Image<itk::Vector<TInputPixel,3>, 3> InputImageType;
45  typedef itk::Image<itk::Vector<TOutputPixel,3>, 3> OutputImageType;
46  typedef itk::VectorImage<TRefPixelType,3> RefImageType;
47 
49  itkStaticConstMacro(InputImageDimension, unsigned int,
50  InputImageType::ImageDimension);
51  itkStaticConstMacro(OutputImageDimension, unsigned int,
52  OutputImageType::ImageDimension);
53 
54  typedef itk::Image<float,InputImageDimension> LocalVariationImageType;
55 
58  typedef ImageToImageFilter< InputImageType, OutputImageType> Superclass;
61 
63  itkFactorylessNewMacro(Self)
64  itkCloneMacro(Self)
65 
67  itkTypeMacro(RegularizedIVIMReconstructionSingleIteration, ImageToImageFilter);
68 
70  typedef typename InputImageType::PixelType InputPixelType;
71  typedef typename OutputImageType::PixelType OutputPixelType;
72 
73  typedef typename InputImageType::RegionType InputImageRegionType;
74  typedef typename OutputImageType::RegionType OutputImageRegionType;
75 
76  typedef typename InputImageType::SizeType InputSizeType;
77 
84  virtual void GenerateInputRequestedRegion()
85  throw(InvalidRequestedRegionError);
86 
87  itkSetMacro(Lambda, double);
88  itkGetMacro(Lambda, double);
89 
90  void SetBValues(vnl_vector<double> bvals)
91  { this->m_BValues = bvals; }
92  vnl_vector<double> GetBValues()
93  { return this->m_BValues; }
94 
95  void SetOriginalImage(RefImageType* in)
96  { this->m_OriginalImage = in; }
98  { return this->m_OriginalImage; }
99 
100 protected:
103  void PrintSelf(std::ostream& os, Indent indent) const;
104 
115  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
116  ThreadIdType threadId );
117 
119 
121 
123 
124  double m_Lambda;
125 
126  vnl_vector<double> m_BValues;
127 
128 private:
129 
131 
132  void operator=(const Self&);
133 
134 };
135 
136 } // end namespace itk
137 
138 #ifndef ITK_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif //__itkRegularizedIVIMReconstructionSingleIteration__
itk::SmartPointer< Self > Pointer
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void PrintSelf(std::ostream &os, Indent indent) const
itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension)
Applies a total variation denoising filter to an image.
ImageToImageFilter< InputImageType, OutputImageType > Superclass
static bool in(Reader::Char c, Reader::Char c1, Reader::Char c2, Reader::Char c3, Reader::Char c4)
Definition: jsoncpp.cpp:244
unsigned short PixelType