VMTK
vtkvmtkCurvedMPRImageFilter.h
Go to the documentation of this file.
1 // Note: this class was contributed by
2 // Hugo Gratama van Andel
3 // Academic Medical Centre - University of Amsterdam
4 // Dept. Biomedical Engineering & Physics
11 #ifndef __vtkvmtkCurvedMPRImageFilter_h
12 #define __vtkvmtkCurvedMPRImageFilter_h
13 
14 #include "vtkImageAlgorithm.h"
15 #include "vtkvmtkWin32Header.h"
16 
17 #include "vtkImageData.h"
18 #include "vtkImageChangeInformation.h"
19 #include "vtkInformation.h"
20 #include "vtkInformationVector.h"
21 #include "vtkStreamingDemandDrivenPipeline.h"
22 #include "vtkTransform.h"
23 #include "vtkImageReslice.h"
24 #include "vtkPointData.h"
25 #include "vtkPolyData.h"
26 #include "vtkCell.h"
27 #include "vtkMath.h"
28 
29 class VTK_VMTK_MISC_EXPORT vtkvmtkCurvedMPRImageFilter : public vtkImageAlgorithm
30 {
31 public:
32  static vtkvmtkCurvedMPRImageFilter *New();
33 
34  vtkTypeMacro(vtkvmtkCurvedMPRImageFilter,vtkImageAlgorithm);
35 
36  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
37 
39 
40  vtkSetObjectMacro(Centerline,vtkPolyData);
41  vtkGetObjectMacro(Centerline,vtkPolyData);
43 
45 
46  vtkSetVector2Macro(InplaneOutputSpacing,double);
47  vtkGetVector2Macro(InplaneOutputSpacing,double);
49 
51 
52  vtkSetVector2Macro(InplaneOutputSize,int);
53  vtkGetVector2Macro(InplaneOutputSize,int);
55 
57 
58  vtkSetMacro(ReslicingBackgroundLevel,double);
59  vtkGetMacro(ReslicingBackgroundLevel,double);
61 
63 
64  vtkSetStringMacro(FrenetTangentArrayName);
65  vtkGetStringMacro(FrenetTangentArrayName);
67 
69 
70  vtkSetStringMacro(ParallelTransportNormalsArrayName);
71  vtkGetStringMacro(ParallelTransportNormalsArrayName);
73 
75 
78  vtkGetVectorMacro(OutputExtent,int,6);
80 
82 
86  vtkGetVectorMacro(OutputOrigin,double,3);
88 
90 
93  vtkGetVectorMacro(OutputSpacing,double,3);
95 
96  protected:
99 //BTX
100  template<class T>
101  void FillSlice(T* outReslicePtr, T* outputImagePtr, int* resliceUpdateExtent, int* outExtent, vtkIdType* outputInc, int slice);
102 //ETX
104 
106  virtual int RequestUpdateExtent (vtkInformation *,
107  vtkInformationVector **,
108  vtkInformationVector *) VTK_OVERRIDE;
109  // Description:
110  // This method is called by the superclass and performs the actual computation of the MPR image
111  virtual int RequestData(vtkInformation *,
112  vtkInformationVector **,
113  vtkInformationVector *) VTK_OVERRIDE;
114  // Description:
115  // This method is called by the superclass and compute the output extent, origin and spacing
116  virtual int RequestInformation (vtkInformation * vtkNotUsed(request),
117  vtkInformationVector **inputVector,
118  vtkInformationVector *outputVector) VTK_OVERRIDE;
120 
121  vtkPolyData * Centerline;
122  double InplaneOutputSpacing[2];
123  int InplaneOutputSize[2];
125  int OutputExtent[6];
126  double OutputOrigin[3];
127  double OutputSpacing[3];
130 
131 private:
132  vtkvmtkCurvedMPRImageFilter(const vtkvmtkCurvedMPRImageFilter&); // Not implemented.
133  void operator=(const vtkvmtkCurvedMPRImageFilter&); // Not implemented.
134 };
135 #endif
creates a multiplanar reconstruction of an image along a centerline path.