VivoQuant 6.0.1
Loading...
Searching...
No Matches
ReorientationOperator Class Reference

Object for reorienting the displayed data in the Slice viewports, including ROIs. More...

#include <ReorientationOperator.h>

Public Member Functions

void resampleData (double vox)
 Resamples the data to either increase or decrease resolution by setting the voxels to a specific size.
 
void resampleDataForScript (double voxXY, double voxZ, int dimX, int dimY, int dimZ)
 Resamples the data to either increase or decrease resolution by setting the voxel size and dimensions of the data in the viewports.
 
UChar_t getMovedROI (int imgIdx, ROILayer *roiLayer, int roiLayerid, UChar_t m)
 In the case of registrations that would cause ROIs to overlap, we need to pick a winner.
 
bool hasROIOverlap ()
 Check if the last reorientation/registration resulted in ROI overlaps.
 
void selectROIs (Array< int > indices, int layer=-1)
 Sets which ROIs are selected using the list provided by 'indices'; each ROI index provided will be selected and all others will not be selected. If you provide an index of # of ROIs + 1, "All" ROIs will be selected.
 
void setManualTransform3D (TransformFactory::AffineType::MatrixType matrix, TransformFactory::AbstractMatrixTransformType::OutputVectorType translation)
 Sets the entire 3D manual transformation and updates the UI values to match with these setting.
 
void setManualTransform2DCurrentSlice (TransformFactory::AffineType2D::MatrixType matrix, TransformFactory::AbstractMatrixTransformType2D::OutputVectorType translation)
 Sets a 2D manual transformation to the current slice and updates the UI values to match with these setting.
 

Protected Member Functions

string saveTransformationToFile (string fileName, string orientation=string())
 Save the transformation parameters to a file on the disk (.xml or .tfm)
 
string loadTransformationFromFile (string fileName, string orient=string())
 Load transformation parameter from a file on the disk (.xml or .tfm)
 
Array< string > getTransformParameters (int mode, int slice=0)
 Get a string containing the transformation parameters.
 
Array< string > getFixedTransformParameters (int mode, int slice=0)
 Get a string containing the fixed transformation parameters.
 

Friends

class MatrixManipulationDialog
 

Detailed Description

Object for reorienting the displayed data in the Slice viewports, including ROIs.

This object can be used to rotate, translate, scale, or flip the data and/or ROIs that are being displayed in each Slice View. It can also be used to interpolate the data being used.

See also ScriptMaster::currentOp() to obtain this object.

Member Function Documentation

◆ getFixedTransformParameters()

Array< string > getFixedTransformParameters ( int  mode,
int  slice = 0 
)
protected

Get a string containing the fixed transformation parameters.

Parameters
modeThe filename to which the transformation should be loaded from
slicethe slice number (optional)
Returns
The parameters string
Note
Manual 3D/2D (0,1), Rigid 3D/2D (2,3), Deformable 3D/2D (4,5), Landmark 3D/2D (6,7)

◆ getMovedROI()

UChar_t getMovedROI ( int  imgIdx,
ROILayer *  roiLayer,
int  roiLayerid,
UChar_t  m 
)

In the case of registrations that would cause ROIs to overlap, we need to pick a winner.

Parameters
imgIdxthe image position
roiLayer
roiLayerid
m
Returns
the voxel value

◆ getTransformParameters()

Array< string > getTransformParameters ( int  mode,
int  slice = 0 
)
protected

Get a string containing the transformation parameters.

Parameters
modeThe mode to obtain the parameters from
slicethe slice number (optional)
Returns
The parameters string
Note
Manual 3D/2D (0,1), Rigid 3D/2D (2,3), Deformable 3D/2D (4,5), Landmark 3D/2D (6,7)

◆ hasROIOverlap()

bool hasROIOverlap ( )

Check if the last reorientation/registration resulted in ROI overlaps.

Returns
true if the moving ROIs overlapped with non-moving ROIs

◆ loadTransformationFromFile()

string loadTransformationFromFile ( string  fileName,
string  orient = string() 
)
inlineprotected

Load transformation parameter from a file on the disk (.xml or .tfm)

Parameters
fileNameThe filename to which the transformation should be loaded from
Returns
An error string

◆ resampleData()

void resampleData ( double  vox)

Resamples the data to either increase or decrease resolution by setting the voxels to a specific size.

Parameters
voxThe desired size of individual voxels being displayed (mm)

◆ resampleDataForScript()

void resampleDataForScript ( double  voxXY,
double  voxZ,
int  dimX,
int  dimY,
int  dimZ 
)

Resamples the data to either increase or decrease resolution by setting the voxel size and dimensions of the data in the viewports.

Parameters
voxXYThe desired planar voxel size
voxZThe desired Slice Spacing
dimXThe desired dimensions of the Sagittal slice view data
dimYThe desired dimensions of the Coronal slice view data
dimZThe desired dimensions of the Transversal slice view data

◆ saveTransformationToFile()

string saveTransformationToFile ( string  fileName,
string  orientation = string() 
)
protected

Save the transformation parameters to a file on the disk (.xml or .tfm)

Parameters
fileNameThe filename to which the transformation should be saved to
Returns
An error string

◆ selectROIs()

void selectROIs ( Array< int >  indices,
int  layer = -1 
)

Sets which ROIs are selected using the list provided by 'indices'; each ROI index provided will be selected and all others will not be selected. If you provide an index of # of ROIs + 1, "All" ROIs will be selected.

Parameters
indicesThe correcponding ROI in the index of ROIs (from 0 to (# of ROI's + 1))
layerIdcorresponding layers in 3DROI Operator

◆ setManualTransform2DCurrentSlice()

void setManualTransform2DCurrentSlice ( TransformFactory::AffineType2D::MatrixType  matrix,
TransformFactory::AbstractMatrixTransformType2D::OutputVectorType  translation 
)

Sets a 2D manual transformation to the current slice and updates the UI values to match with these setting.

Parameters
matrixThe 2D matrix of the transformation to set
translationThe 2D translation of the transformation to set

◆ setManualTransform3D()

void setManualTransform3D ( TransformFactory::AffineType::MatrixType  matrix,
TransformFactory::AbstractMatrixTransformType::OutputVectorType  translation 
)

Sets the entire 3D manual transformation and updates the UI values to match with these setting.

Parameters
matrixThe 3D matrix of the transformation to set
translationThe 3D translation of the transformation to set