Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkSplitDWImageFilter.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 ITKSPLITDWIMAGEFILTER_H
18 #define ITKSPLITDWIMAGEFILTER_H
19 
20 #include "itkImageToImageFilter.h"
21 #include <itkVectorImage.h>
22 
23 namespace itk
24 {
25 
36 template< class TInputImagePixelType,
37  class TOutputImagePixelType >
39  public ImageToImageFilter< VectorImage<TInputImagePixelType, 3>,
40  Image< TOutputImagePixelType, 4 > >
41 {
42 public:
43 
47 
48  typedef TInputImagePixelType InputPixelType;
49  typedef TOutputImagePixelType OutputPixelType;
50 
51  typedef ImageToImageFilter< VectorImage<TInputImagePixelType, 3>,
52  Image< TOutputImagePixelType, 4 > > Superclass;
53 
56  //typedef typename Superclass::OutputImageType OutputImageType;
57  typedef Image< TOutputImagePixelType, 4 > OutputImageType;
58  typedef typename OutputImageType::RegionType OutputImageRegionType;
59 
60  typedef std::vector< unsigned int > IndexListType;
61  typedef std::map< unsigned int, IndexListType> BValueMapType;
62 
64  itkFactorylessNewMacro(Self)
65  itkCloneMacro(Self)
66 
68  itkTypeMacro(SplitDWImageFilter, ImageToImageFilter);
69 
75  void SetExtractIndices( IndexListType list)
76  {
77  m_IndexList = list;
78  }
79 
86  {
87  m_ExtractAllImages = true;
88  }
89 
103  void SetExtractAllAboveThreshold( double b_threshold, BValueMapType map);
104 
110  void SetExtractSingleShell( double b_value, BValueMapType map, double tol );
111 
119  const IndexListType GetIndexList() const
120  {
121  return m_IndexList;
122  }
123 
124 protected:
125 
127  virtual ~SplitDWImageFilter(){};
128 
129  void GenerateData();
130 
136  virtual void CopyInformation( const DataObject *data);
137 
141  virtual void GenerateOutputInformation();
142 
143  IndexListType m_IndexList;
145 };
146 
147 } //end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkSplitDWImageFilter.txx"
151 #endif
152 
153 #endif // ITKSPLITDWIMAGEFILTER_H
Image< TOutputImagePixelType, 4 > OutputImageType
TOutputImagePixelType OutputPixelType
SmartPointer< const Self > ConstPointer
OutputImageType::RegionType OutputImageRegionType
const IndexListType GetIndexList() const
Returns the index list used for extraction.
ImageToImageFilter< VectorImage< TInputImagePixelType, 3 >, Image< TOutputImagePixelType, 4 > > Superclass
std::map< unsigned int, IndexListType > BValueMapType
itk::Image< double, 3 > InputImageType
TInputImagePixelType InputPixelType
virtual void CopyInformation(const DataObject *data)
Splits a DW-Image passed in as input into a 3D-t image where each volume coresponds to a gradient ima...
std::vector< unsigned int > IndexListType
SmartPointer< Self > Pointer
void SetExtractAllAboveThreshold(double b_threshold, BValueMapType map)
Selects only the weighted images with b-value above the given b_threshold to be extracted.
virtual void GenerateOutputInformation()
void SetExtractSingleShell(double b_value, BValueMapType map, double tol)
SetExtractSingleShell.
void SetExtractIndices(IndexListType list)
Set the indices of the images to be extracted.
void SetExtractAll()
Extract all images.
Superclass::InputImageType InputImageType