Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkRemoveDwiChannelFilter.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 __itkRemoveDwiChannelFilter_h_
23 #define __itkRemoveDwiChannelFilter_h_
24 
25 #include "itkImageToImageFilter.h"
26 #include "itkVectorImage.h"
27 #include <itkImageRegionIteratorWithIndex.h>
29 
30 namespace itk{
35 template< class TInPixelType >
37  public ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > >
38 {
39 
40 public:
41 
45  typedef ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > > Superclass;
46 
48  itkFactorylessNewMacro(Self)
49  itkCloneMacro(Self)
50 
52  itkTypeMacro(RemoveDwiChannelFilter, ImageToImageFilter)
53 
54  typedef typename Superclass::InputImageType InputImageType;
55  typedef typename Superclass::OutputImageType OutputImageType;
56  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
57  typedef typename mitk::DiffusionPropertyHelper::GradientDirectionType DirectionType;
58  typedef typename mitk::DiffusionPropertyHelper::GradientDirectionsContainerType DirectionContainerType;
59 
60  void SetChannelIndices( std::vector< unsigned int > indices ){ m_ChannelIndices = indices; }
61  void SetDirections( typename DirectionContainerType::Pointer directions ){ m_Directions = directions; }
63 
64  protected:
67  void PrintSelf(std::ostream& os, Indent indent) const;
68 
70  void ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType id );
71 
72  std::vector< unsigned int > m_ChannelIndices;
75 };
76 
77 }
78 
79 #ifndef ITK_MANUAL_INSTANTIATION
81 #endif
82 
83 #endif //__itkRemoveDwiChannelFilter_h_
84 
Remove spcified channels from diffusion-weighted image.
itk::SmartPointer< Self > Pointer
mitk::DiffusionPropertyHelper::GradientDirectionsContainerType DirectionContainerType
void SetChannelIndices(std::vector< unsigned int > indices)
void SetDirections(typename DirectionContainerType::Pointer directions)
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
DirectionContainerType::Pointer GetNewDirections()
Superclass::InputImageType InputImageType
std::vector< unsigned int > m_ChannelIndices
DirectionContainerType::Pointer m_Directions
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType id)
Superclass::OutputImageRegionType OutputImageRegionType
DirectionContainerType::Pointer m_NewDirections
ImageToImageFilter< VectorImage< TInPixelType, 3 >, VectorImage< TInPixelType, 3 > > Superclass
Superclass::OutputImageType OutputImageType
mitk::DiffusionPropertyHelper::GradientDirectionType DirectionType
void PrintSelf(std::ostream &os, Indent indent) const
SmartPointer< const Self > ConstPointer