18 #ifndef ODFVTKMAPPER2D_H_HEADER_INCLUDED
19 #define ODFVTKMAPPER2D_H_HEADER_INCLUDED
22 #include "vtkPropAssembly.h"
23 #include "vtkAppendPolyData.h"
25 #include "vtkPolyDataMapper.h"
27 #include "vtkCutter.h"
28 #include "vtkClipPolyData.h"
29 #include "vtkTransform.h"
30 #include "vtkDataArrayTemplate.h"
31 #include "vtkSmartPointer.h"
40 template<
class TPixelType,
int NrOdfDirections>
43 struct OdfDisplayGeometry {
44 double vp[ 3 ], vnormal[ 3 ];
49 double vp_original[ 3 ], vnormal_original[ 3 ];
52 bool Equals(OdfDisplayGeometry other)
54 return other.vp_original[0] == vp[0] &&
55 other.vp_original[1] == vp[1] &&
56 other.vp_original[2] == vp[2] &&
57 other.vnormal_original[0] == vnormal[0] &&
58 other.vnormal_original[1] == vnormal[1] &&
59 other.vnormal_original[2] == vnormal[2] &&
60 other.size[0] == size[0] &&
61 other.size[1] == size[1] &&
62 other.origin[0] == origin[0] &&
63 other.origin[1] == origin[1];
70 itkFactorylessNewMacro(
Self)
128 static vtkSmartPointer<vtkTransform> m_OdfTransform;
129 static vtkSmartPointer<vtkOdfSource> m_OdfSource;
130 static float m_Scaling;
131 static int m_Normalization;
132 static int m_ScaleBy;
133 static float m_IndexParam1;
134 static float m_IndexParam2;
135 static vtkSmartPointer<vtkDoubleArray> m_colourScalars;
139 std::vector< vtkSmartPointer<vtkPlane> > m_Planes;
140 std::vector< vtkSmartPointer<vtkCutter> > m_Cutters;
141 std::vector< vtkSmartPointer<vtkThickPlane> > m_ThickPlanes1;
142 std::vector< vtkSmartPointer<vtkClipPolyData> > m_Clippers1;
143 std::vector< vtkSmartPointer<vtkThickPlane> > m_ThickPlanes2;
144 std::vector< vtkSmartPointer<vtkClipPolyData> > m_Clippers2;
145 vtkImageData* m_VtkImage ;
146 OdfDisplayGeometry m_LastDisplayGeometry;
virtual void GenerateDataForRenderer(mitk::BaseRenderer *renderer) override
Generate the data needed for rendering into renderer.
OdfDisplayGeometry MeasureDisplayedGeometry(mitk::BaseRenderer *renderer)
Base class for mapper specific rendering ressources.
virtual void MitkRenderOpaqueGeometry(mitk::BaseRenderer *renderer) override
Checks visibility and renders untransparent geometry.
virtual void Update(mitk::BaseRenderer *renderer) override
Calls the time step of the input data for the specified renderer and checks whether the time step is ...
vtkSmartPointer< vtkPolyData > m_TemplateOdf
~LocalStorage()
Default deconstructor of the local storage.
virtual vtkProp * GetVtkProp(mitk::BaseRenderer *renderer) override
std::vector< vtkSmartPointer< vtkActor > > m_OdfsActors
bool IsVisibleOdfs(mitk::BaseRenderer *renderer)
Organizes the rendering process.
void ApplyPropertySettings()
DataCollection - Class to facilitate loading/accessing structured data.
static bool m_toggleTensorEllipsoidView
Mapper for spherical object densitiy function representations.
virtual void MitkRenderVolumetricGeometry(mitk::BaseRenderer *) override
Checks visibility and renders volumes.
static bool m_toggleColourisationMode
Base class of all Vtk Mappers in order to display primitives by exploiting Vtk functionality.
Base class of all mappers, Vtk as well as OpenGL mappers.
itk::TimeStamp m_LastUpdateTime
static bool m_toggleGlyphPlacementMode
vnl_matrix_fixed< double, 3, 3 > DirectionsType
virtual void MitkRenderOverlay(mitk::BaseRenderer *renderer) override
Checks visibility and renders the overlay.
LocalStorage()
Default constructor of the local storage.
virtual int GetIndex(mitk::BaseRenderer *renderer)
virtual void Slice(mitk::BaseRenderer *renderer, OdfDisplayGeometry dispGeo)
bool IsPlaneRotated(mitk::BaseRenderer *renderer)
static void GlyphMethod(void *arg)
Image class for storing images.
std::vector< vtkSmartPointer< vtkPolyDataMapper > > m_OdfsMappers
static void SetDefaultProperties(DataNode *node, BaseRenderer *renderer=NULL, bool overwrite=false)
std::vector< vtkSmartPointer< vtkPropAssembly > > m_PropAssemblies
double GetMinImageSpacing(int index)
std::vector< vtkSmartPointer< vtkAppendPolyData > > m_OdfsPlanes
virtual void MitkRenderTranslucentGeometry(mitk::BaseRenderer *renderer) override
Checks visiblity and renders transparent geometry.
virtual bool IsLODEnabled(BaseRenderer *) const override
virtual ~OdfVtkMapper2D()
mitkClassMacro(OdfVtkMapper2D, VtkMapper) static Pointer New()
Class for nodes of the DataTree.