Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
itkTractsToRgbaImageFilter.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 #ifndef __itkTractsToRgbaImageFilter_h__
17 #define __itkTractsToRgbaImageFilter_h__
18 
19 #include <itkImageSource.h>
20 #include <itkImage.h>
21 #include <itkVectorContainer.h>
22 #include <itkRGBAPixel.h>
23 #include <mitkFiberBundle.h>
24 
25 namespace itk{
26 
30 template< class OutputImageType >
31 class TractsToRgbaImageFilter : public ImageSource< OutputImageType >
32 {
33 
34 public:
36  typedef ProcessObject Superclass;
39 
41  typedef itk::Image<unsigned char, 3> InputImageType;
42 
43  itkFactorylessNewMacro(Self)
44  itkCloneMacro(Self)
45  itkTypeMacro( TractsToRgbaImageFilter, ImageSource )
46 
48  itkSetMacro( UpsamplingFactor, float)
49  itkGetMacro( UpsamplingFactor, float)
50 
51  itkSetMacro( FiberBundle, mitk::FiberBundle::Pointer)
52  itkSetMacro( InputImage, typename InputImageType::Pointer)
53 
55  itkSetMacro( UseImageGeometry, bool)
56  itkGetMacro( UseImageGeometry, bool)
57 
58 
59  void GenerateData();
60 
61 protected:
62 
63  itk::Point<float, 3> GetItkPoint(double point[3]);
64 
65  TractsToRgbaImageFilter();
66  virtual ~TractsToRgbaImageFilter();
67 
68  mitk::FiberBundle::Pointer m_FiberBundle;
71  typename InputImageType::Pointer m_InputImage;
72 };
73 
74 }
75 
76 #ifndef ITK_MANUAL_INSTANTIATION
78 #endif
79 
80 #endif // __itkTractsToRgbaImageFilter_h__
bool m_UseImageGeometry
output image is given other geometry than fiberbundle (input image geometry)
OutputImageType::PixelType OutPixelType
mitk::FiberBundle::Pointer m_FiberBundle
input fiber bundle
itk::Image< unsigned char, 3 > InputImageType
DataCollection - Class to facilitate loading/accessing structured data.
itk::Point< float, 3 > GetItkPoint(double point[3])
float m_UpsamplingFactor
use higher resolution for ouput image
SmartPointer< const Self > ConstPointer
unsigned short PixelType
Generates RGBA image from the input fibers where color values are set according to the local fiber di...