Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkFieldmapGeneratorFilter.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 __itkFieldmapGeneratorFilter_h__
17 #define __itkFieldmapGeneratorFilter_h__
18 
19 #include <itkImageSource.h>
20 #include <itkImage.h>
21 #include <itkImageRegion.h>
22 #include <itkVector.h>
23 #include <mitkNumericTypes.h>
24 #include <itkMatrix.h>
25 #include <vector>
26 
27 namespace itk{
28 
34 template< class OutputImageType >
35 class FieldmapGeneratorFilter : public ImageSource< OutputImageType >
36 {
37 
38 public:
40  typedef ProcessObject Superclass;
43 
45  typedef typename OutputImageType::IndexType IndexType;
46  typedef itk::ImageRegion<3> OutputImageRegionType;
47  typedef itk::Matrix<double, 3, 3> MatrixType;
48 
49  itkFactorylessNewMacro(Self)
50  itkCloneMacro(Self)
51  itkTypeMacro( FieldmapGeneratorFilter, ImageSource )
52 
54  itkSetMacro( Spacing, itk::Vector<double> )
55  itkSetMacro( Origin, mitk::Point3D )
56  itkSetMacro( DirectionMatrix, MatrixType )
57  itkSetMacro( ImageRegion, OutputImageRegionType )
58 
60  void SetGradient( vnl_vector_fixed< double, 3 > gradient ) { m_Gradient=gradient; }
61  void SetOffset( vnl_vector_fixed< double, 3 > offset ) { m_Offset=offset; }
62 
64  void SetVariances( std::vector< double > variances ) { m_Variances=variances; }
65  void SetHeights( std::vector< double > heights ) { m_Heights=heights; }
66  void SetWorldPositions( std::vector< mitk::Point3D > worldPositions ) { m_WorldPositions=worldPositions; }
67 
68 protected:
69 
71  void ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId);
72 
74  virtual ~FieldmapGeneratorFilter();
75 
76  itk::Vector<double> m_Spacing;
78  MatrixType m_DirectionMatrix;
79  OutputImageRegionType m_ImageRegion;
80  std::vector< double > m_Variances;
81  std::vector< double > m_Heights;
82  std::vector< mitk::Point3D > m_WorldPositions;
83  vnl_vector_fixed< double, 3 > m_Gradient;
84  vnl_vector_fixed< double, 3 > m_Offset;
85 };
86 
87 }
88 
89 #ifndef ITK_MANUAL_INSTANTIATION
91 #endif
92 
93 #endif // __itkFieldmapGeneratorFilter_h__
itk::Matrix< double, 3, 3 > MatrixType
OutputImageType::IndexType IndexType
mitk::Point3D m_Origin
output image origin
DataCollection - Class to facilitate loading/accessing structured data.
void SetHeights(std::vector< double > heights)
MatrixType m_DirectionMatrix
output image rotation
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
static Vector3D offset
void SetOffset(vnl_vector_fixed< double, 3 > offset)
OutputImageType::PixelType PixelType
vnl_vector_fixed< double, 3 > m_Gradient
itk::Vector< double > m_Spacing
output image spacing
Generate float image with artificial frequency maps used by Fiberfox. Simulates additional frequencie...
Point< ScalarType, 3 > Point3D
Definition: mitkPoint.h:99
OutputImageRegionType m_ImageRegion
output image size
void SetVariances(std::vector< double > variances)
unsigned short PixelType
vnl_vector_fixed< double, 3 > m_Offset
SmartPointer< const Self > ConstPointer
itk::ImageRegion< 3 > OutputImageRegionType
std::vector< mitk::Point3D > m_WorldPositions
void SetWorldPositions(std::vector< mitk::Point3D > worldPositions)
void SetGradient(vnl_vector_fixed< double, 3 > gradient)