Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkExtractDwiChannelFilter.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 __itkExtractDwiChannelFilter_h_
23 #define __itkExtractDwiChannelFilter_h_
24 
25 #include "itkImageToImageFilter.h"
26 #include "itkVectorImage.h"
27 #include <itkImageRegionIteratorWithIndex.h>
28 #include <mitkImage.h>
29 
30 namespace itk{
35 template< class TInPixelType >
37  public ImageToImageFilter< VectorImage< TInPixelType, 3 >, Image< TInPixelType, 3 > >
38 {
39 
40 public:
41 
45  typedef ImageToImageFilter< VectorImage< TInPixelType, 3 >, Image< TInPixelType, 3 > > Superclass;
46 
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
52  itkTypeMacro(ExtractDwiChannelFilter, ImageToImageFilter)
53 
54  typedef typename Superclass::InputImageType InputImageType;
55  typedef typename Superclass::OutputImageType OutputImageType;
56  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
57 
58  itkSetMacro( ChannelIndex, unsigned int )
59 
60  protected:
61  ExtractDwiChannelFilter();
62  ~ExtractDwiChannelFilter() {}
63 
65  void ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType );
66 
67  unsigned int m_ChannelIndex;
68 };
69 
70 }
71 
72 #ifndef ITK_MANUAL_INSTANTIATION
74 #endif
75 
76 #endif //__itkExtractDwiChannelFilter_h_
77 
ImageToImageFilter< VectorImage< TInPixelType, 3 >, Image< TInPixelType, 3 > > Superclass
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType)
Superclass::InputImageType InputImageType
Superclass::OutputImageRegionType OutputImageRegionType
Superclass::OutputImageType OutputImageType
Remove specified channels from diffusion-weighted image.
SmartPointer< const Self > ConstPointer