20 #ifndef __vtkSlicerTransformLogic_h 21 #define __vtkSlicerTransformLogic_h 25 #include "vtkSlicerTransformsModuleLogicExport.h" 50 class vtkUnstructuredGrid;
59 void PrintSelf(ostream& os, vtkIndent indent)
override { Superclass::PrintSelf(os, indent); }
83 vtkMatrix4x4* sliceToRAS,
double* fieldOfViewOrigin,
double* fieldOfViewSize, vtkPoints* samplePositions_RAS =
nullptr);
90 vtkMatrix4x4* roiToRAS,
int* roiSize, vtkPoints* samplePositions_RAS =
nullptr);
101 static const char* GetVisualizationDisplacementMagnitudeScalarName();
123 static bool GetTransformedPointSamplesAsMagnitudeImage(vtkImageData* outputMagnitudeImage,
vtkMRMLTransformNode* inputTransformNode,
124 vtkMatrix4x4* ijkToRAS,
bool transformToWorld =
true);
132 static bool GetTransformedPointSamplesAsVectorImage(vtkImageData* outputVectorImage,
vtkMRMLTransformNode* inputTransformNode,
133 vtkMatrix4x4* ijkToRAS,
bool transformToWorld =
true);
139 static void GetTransformedNodes(
141 std::vector<vtkMRMLDisplayableNode*>& transformedNodes,
142 bool recursive=
true);
148 static void GetNodesRASBounds(
149 const std::vector<vtkMRMLDisplayableNode*>&
nodes,
156 static void GetNodesBounds(
157 const std::vector<vtkMRMLDisplayableNode*>&
nodes,
166 TRANSFORM_THINPLATESPLINE
186 double* fieldOfViewOrigin,
double* fieldOfViewSize, vtkPoints* samplePositions_RAS =
nullptr);
191 int* roiSize, vtkPoints* samplePositions_RAS =
nullptr);
196 double* fieldOfViewOrigin,
double* fieldOfViewSize);
199 static void GetGridVisualization3d(vtkPolyData* output_RAS,
vtkMRMLTransformDisplayNode* displayNode, vtkMatrix4x4* roiToRAS,
int* roiSize);
204 double* fieldOfViewOrigin,
double* fieldOfViewSize);
207 static void GetContourVisualization3d(vtkPolyData* output_RAS,
vtkMRMLTransformDisplayNode* displayNode, vtkMatrix4x4* roiToRAS,
int* roiSize);
213 static void CreateGrid(vtkPolyData* outputGrid_RAS,
vtkMRMLTransformDisplayNode* displayNode,
int numGridPoints[3], vtkPolyData* outputWarpedGrid_RAS=
nullptr);
218 static void GetTransformedPointSamples(vtkPointSet* outputPointSet,
220 bool transformToWorld =
true);
227 static void GetTransformedPointSamples(vtkPointSet* outputPointSet_RAS,
vtkMRMLTransformNode* inputTransformNode,
228 vtkMatrix4x4* gridToRAS,
int* gridSize,
bool transformToWorld =
true);
234 static void GetTransformedPointSamplesOnSlice(vtkPointSet* outputPointSet_RAS,
vtkMRMLTransformNode* inputTransformNode,
235 vtkMatrix4x4* sliceToRAS,
double* fieldOfViewOrigin,
double* fieldOfViewSize,
double pointSpacing,
int pointGroupSize = 1,
int* numGridPoints =
nullptr,
236 vtkPoints* samplePositions_RAS =
nullptr);
241 static void GetTransformedPointSamplesOnRoi(vtkPointSet* outputPointSet_RAS,
vtkMRMLTransformNode* inputTransformNode,
242 vtkMatrix4x4* roiToRAS,
int* roiSize,
double pointSpacingMm,
int pointGroupSize=1,
int* numGridPoints=
nullptr);
245 static void GetMarkupsAsPoints(
vtkMRMLMarkupsNode* markupsNode, vtkPoints* samplePoints_RAS);
Superclass for MRML logic classes.
MRML node for storing a slice through RAS space.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node for representing a volume (image stack).
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
static vtkMRMLAbstractLogic * New()