![]() |
Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
#include <Modules/Loadable/GeneralizedReformat/Logic/vtkSlicerGeneralizedReformatLogic.h>
Public Types | |
typedef vtkSlicerModuleLogic | Superclass |
![]() | |
typedef vtkMRMLAbstractLogic | Superclass |
![]() | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
bool | ComputeStraighteningTransform (vtkMRMLTransformNode *transformToStraightenedNode, vtkMRMLMarkupsCurveNode *curveNode, const double sliceSizeMm[2], double outputSpacingMm, bool stretching=false, double rotationDeg=0.0, vtkMRMLModelNode *reslicingPlanesModelNode=nullptr) |
virtual const char * | GetClassName () |
bool | GetPointsProjectedToPlane (vtkPoints *pointsArrayIn, vtkMatrix4x4 *transformWorldToPlane, vtkPoints *pointsArrayOut) |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) override |
bool | ProjectVolume (vtkMRMLScalarVolumeNode *outputProjectedVolume, vtkMRMLScalarVolumeNode *inputStraightenedVolume, int projectionAxisIndex=0) |
bool | ResampleVolume (std::string &resamplerName, vtkMRMLVolumeNode *inputVolume, vtkMRMLVolumeNode *outputVolume, vtkMRMLTransformNode *resamplingTransform, vtkMRMLVolumeNode *referenceVolume=nullptr, int interpolationType=vtkMRMLAbstractVolumeResampler::InterpolationTypeLinear, const vtkMRMLAbstractVolumeResampler::ResamplingParameters &resamplingParameters=vtkMRMLAbstractVolumeResampler::ResamplingParameters()) |
bool | StraightenVolume (vtkMRMLScalarVolumeNode *outputStraightenedVolume, vtkMRMLScalarVolumeNode *volumeNode, const double outputStraightenedVolumeSpacing[3], vtkMRMLTransformNode *straighteningTransformNode) |
void | RegisterVolumeResampler (const std::string &resamplerName, vtkMRMLAbstractVolumeResampler *resampler) |
void | UnregisterVolumeResampler (const std::string &resamplerName) |
bool | IsVolumeResamplerRegistered (const std::string &resamplerName) |
vtkMRMLAbstractVolumeResampler * | GetVolumeResampler (const std::string &resamplerName) |
![]() | |
virtual vtkSlicerApplicationLogic * | GetApplicationLogic () |
Get access to overall application state. | |
virtual vtkMRMLAbstractLogic * | GetModuleLogic (const char *moduleName) |
Convenience method for getting another module's logic from the application logic. | |
std::string | GetModuleShareDirectory () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
void | SetModuleShareDirectory (const std::string &shareDirectory) |
![]() | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. | |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkSlicerGeneralizedReformatLogic * | New () |
static vtkSlicerGeneralizedReformatLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkSlicerModuleLogic * | New () |
The Usual vtk class functions. | |
static vtkSlicerModuleLogic * | SafeDownCast (vtkObject *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
void | OnMRMLSceneNodeAdded (vtkMRMLNode *node) override |
void | OnMRMLSceneNodeRemoved (vtkMRMLNode *node) override |
void | RegisterNodes () override |
Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. | |
void | SetMRMLSceneInternal (vtkMRMLScene *newScene) override |
void | UpdateFromMRMLScene () override |
vtkSlicerGeneralizedReformatLogic () | |
~vtkSlicerGeneralizedReformatLogic () override | |
![]() | |
vtkSlicerModuleLogic () | |
~vtkSlicerModuleLogic () override | |
![]() | |
int | EndModify (bool wasModifying) |
virtual bool | EnterMRMLLogicsCallback () const |
virtual bool | EnterMRMLNodesCallback () const |
virtual bool | EnterMRMLSceneCallback () const |
bool | GetDisableModifiedEvent () const |
int | GetInMRMLLogicsCallbackFlag () const |
int | GetInMRMLNodesCallbackFlag () const |
int | GetInMRMLSceneCallbackFlag () const |
vtkCallbackCommand * | GetMRMLLogicsCallbackCommand () |
vtkObserverManager * | GetMRMLLogicsObserverManager () const |
vtkCallbackCommand * | GetMRMLNodesCallbackCommand () |
vtkObserverManager * | GetMRMLNodesObserverManager () const |
vtkCallbackCommand * | GetMRMLSceneCallbackCommand () |
vtkObserverManager * | GetMRMLSceneObserverManager () const |
int | GetPendingModifiedEventCount () const |
int | GetProcessingMRMLSceneEvent () const |
Return the event id currently processed or 0 if any. | |
int | InvokePendingModifiedEvent () |
void | Modified () override |
virtual void | ObserveMRMLScene () |
virtual void | OnMRMLNodeModified (vtkMRMLNode *) |
virtual void | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneEndClose () |
virtual void | OnMRMLSceneEndImport () |
virtual void | OnMRMLSceneEndRestore () |
virtual void | OnMRMLSceneNew () |
virtual void | OnMRMLSceneStartBatchProcess () |
virtual void | OnMRMLSceneStartClose () |
virtual void | OnMRMLSceneStartImport () |
virtual void | OnMRMLSceneStartRestore () |
virtual void | ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData) |
void | SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=nullptr) |
void | SetDisableModifiedEvent (bool onOff) |
void | SetInMRMLLogicsCallbackFlag (int flag) |
void | SetInMRMLNodesCallbackFlag (int flag) |
void | SetInMRMLSceneCallbackFlag (int flag) |
void | SetProcessingMRMLSceneEvent (int event) |
bool | StartModify () |
virtual void | UnobserveMRMLScene () |
vtkMRMLAbstractLogic () | |
~vtkMRMLAbstractLogic () override | |
Protected Attributes | |
std::map< std::string, vtkSmartPointer< vtkMRMLAbstractVolumeResampler > > | Resamplers |
double | TransformSpacingFactor { 5.0 } |
Additional Inherited Members | |
![]() | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. | |
static void | MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Definition at line 49 of file vtkSlicerGeneralizedReformatLogic.h.
Definition at line 55 of file vtkSlicerGeneralizedReformatLogic.h.
|
protected |
|
overrideprotected |
bool vtkSlicerGeneralizedReformatLogic::ComputeStraighteningTransform | ( | vtkMRMLTransformNode * | transformToStraightenedNode, |
vtkMRMLMarkupsCurveNode * | curveNode, | ||
const double | sliceSizeMm[2], | ||
double | outputSpacingMm, | ||
bool | stretching = false, | ||
double | rotationDeg = 0.0, | ||
vtkMRMLModelNode * | reslicingPlanesModelNode = nullptr ) |
Compute transform that straightens volume (useful for example for visualization of curved vessels)
transformToStraightenedNode | the computed transform |
curveNode | curve that defines the planar reformation |
sliceSizeMm | dimensions of slice that is produced |
outputSpacingMm | spacing to be used along the curve |
stretching | if True then stretching transform will be computed, otherwise straightening |
rotationDeg | number of degrees to rotate the output |
reslicingPlanesModelNode |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
bool vtkSlicerGeneralizedReformatLogic::GetPointsProjectedToPlane | ( | vtkPoints * | pointsArrayIn, |
vtkMatrix4x4 * | transformWorldToPlane, | ||
vtkPoints * | pointsArrayOut ) |
Projects input points onto a specified plane.
pointsArrayIn | Input points in world coordinates. |
transformWorldToPlane | Transformation matrix from world to plane coordinates. |
pointsArrayOut | Output points projected onto the plane. |
This function transforms input points into the plane's coordinate system, where the plane's normal aligns with the Z-axis. The projection is performed by setting the Z coordinate of each point to zero, effectively flattening it onto the plane. The points are then transformed back into world coordinates and stored in pointsArrayOut
.
vtkMRMLAbstractVolumeResampler * vtkSlicerGeneralizedReformatLogic::GetVolumeResampler | ( | const std::string & | resamplerName | ) |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
|
static |
bool vtkSlicerGeneralizedReformatLogic::IsVolumeResamplerRegistered | ( | const std::string & | resamplerName | ) |
|
static |
|
overrideprotectedvirtual |
If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
overrideprotectedvirtual |
If vtkMRMLScene::NodeRemovedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event
Reimplemented from vtkMRMLAbstractLogic.
|
override |
bool vtkSlicerGeneralizedReformatLogic::ProjectVolume | ( | vtkMRMLScalarVolumeNode * | outputProjectedVolume, |
vtkMRMLScalarVolumeNode * | inputStraightenedVolume, | ||
int | projectionAxisIndex = 0 ) |
Create panoramic volume by mean intensity projection along an axis of the straightened volume
outputProjectedVolume | resulting 2-dimensional projection |
inputStraightenedVolume | input volume to be projected |
projectionAxisIndex | axis to perform the projection on |
|
overrideprotectedvirtual |
Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.
Reimplemented from vtkMRMLAbstractLogic.
void vtkSlicerGeneralizedReformatLogic::RegisterVolumeResampler | ( | const std::string & | resamplerName, |
vtkMRMLAbstractVolumeResampler * | resampler ) |
Register/unregister resampler.
bool vtkSlicerGeneralizedReformatLogic::ResampleVolume | ( | std::string & | resamplerName, |
vtkMRMLVolumeNode * | inputVolume, | ||
vtkMRMLVolumeNode * | outputVolume, | ||
vtkMRMLTransformNode * | resamplingTransform, | ||
vtkMRMLVolumeNode * | referenceVolume = nullptr, | ||
int | interpolationType = vtkMRMLAbstractVolumeResampler::InterpolationTypeLinear, | ||
const vtkMRMLAbstractVolumeResampler::ResamplingParameters & | resamplingParameters = vtkMRMLAbstractVolumeResampler::ResamplingParameters() ) |
Resample volume using the registered resampler.
resamplerName | the name as registered with vtkMRMLApplicationLogic |
inputVolume | the volume to be resampled |
outputVolume | the resulting volume |
resamplingTransform | the transform to apply |
referenceVolume | |
interpolationType | see enum in vtkMRMLAbstractVolumeResampler.h |
resamplingParameters | reserved for future use |
|
static |
|
overrideprotectedvirtual |
Called each time a new scene is set. Can be reimplemented in derived classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.
Reimplemented from vtkMRMLAbstractLogic.
bool vtkSlicerGeneralizedReformatLogic::StraightenVolume | ( | vtkMRMLScalarVolumeNode * | outputStraightenedVolume, |
vtkMRMLScalarVolumeNode * | volumeNode, | ||
const double | outputStraightenedVolumeSpacing[3], | ||
vtkMRMLTransformNode * | straighteningTransformNode ) |
Straighten volume for curved planar reformation
outputStraightenedVolume | result of straightening computation |
volumeNode | input volume to be straightened |
outputStraightenedVolumeSpacing | spacing in the output volume |
straighteningTransformNode | transform to be applied |
void vtkSlicerGeneralizedReformatLogic::UnregisterVolumeResampler | ( | const std::string & | resamplerName | ) |
|
overrideprotectedvirtual |
Called every time the scene has been significantly changed. If the scene BatchProcessState events are observed (in SetMRMLSceneInternal() ), UpdateFromMRMLScene is called after each batch process (Close, Import, Restore...). It is also being called by default when a new scene is set (SetMRMLScene).
Reimplemented from vtkMRMLAbstractLogic.
|
protected |
Definition at line 165 of file vtkSlicerGeneralizedReformatLogic.h.
|
protected |
Definition at line 163 of file vtkSlicerGeneralizedReformatLogic.h.