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

Manipulate and control the display within the slice view. More...

#include <QSliceViewControl.h>

Public Member Functions

void setNumber (int dims[3])
 Set ranges for the slice view axes. If the current position is invalid in the new ranges, the position will be recentered.
 
int getMax (int i)
 Get the maximum index of a slice in a given plane of view.
 
int getPos (int id, int a)
 Get the index of the slice currently open in the view (usually shown by a crosshair.)
 
int getPos (int a)
 Get the index of the slice currently open in the view (usually shown by a crosshair.)
 
void setPos (int *coordinates, int viewport_id)
 Set the slice coordinates from an array for the given Viewport ID.
 
void setPos (int *coordinates)
 Set the slice coordinates from an array for the current Viewport ID (See viewport_id for details).
 
void setPos (int plane, int pos, int viewport_id)
 Set a single slice coordinate in a plane for the current Viewport ID.
 
void setPos (int plane, int pos)
 Set a single slice coordinate in a plane for the current Viewport ID (See viewport_id for details).
 
float getIntensity (int viewport_id, int data_id)
 Get the intensity of the view.
 
float getIntensity (int data_id)
 Get the intensity of the view for the given Data ID in the current Viewport ID (See viewport_id for details).
 
void setIntensity (int data_id, float intensity, int viewport_id)
 Set intensity component for a given Data and Viewport ID.
 
void setIntensity (int data_id, float intensity)
 Set intensity component for a Data ID in the current Viewport ID (See viewport_id for details).
 
bool getActive (int viewport_id, int data_id)
 Return whether the given data ID is active (visible) for the provided Viewport ID.
 
bool getActive (int data_id)
 Return whether the given data ID is active (visible) for the current Viewport ID (See viewport_id for details).
 
void setActive (int data_id, bool visible, int viewport_id)
 Sets the visibility of a dataset for the specified Data and Viewport ID.
 
void setActive (int data_id, bool visible)
 Sets the visibility of a dataset for the specified ID for the current Viewport ID (See viewport_id for details). If Link Views is checked, it will be applied to all.
 
bool getShowROIs (int viewport_id)
 Returns whether ROIs are shown for the given Viewport ID (See viewport_id for details).
 
bool getShowROIs ()
 Returns whether ROIs are shown for the current Viewport ID (See viewport_id for details).
 
void setShowROIs (bool toShow, int viewport_id)
 Show/hide ROIs for the specified Viewport ID.
 
bool getShowAnnotations (int viewport_id)
 Returns whether annotations are shown for the given Viewport ID.
 
bool getShowAnnotations ()
 Returns whether annotations are shown for the current Viewport ID (See viewport_id for details).
 
void setShowAnnotations (bool toShow, int id)
 Show/hide annotations for all datasets.
 
CropView getCropStyle (int viewport_id)
 Returns the crop style for the given Viewport ID.
 
CropView getCropStyle ()
 Returns the crop style (NONE=0, DASHED=1, FILLED=2) for the current Viewport ID (See viewport_id for details).
 
void setCropStyle (CropView style, int id)
 Set the crop style for all datasets.
 
bool getShowFiducials (int viewport_id)
 Returns whether fiducials are shown for the given Viewport ID.
 
bool getShowFiducials ()
 Returns whether fiducials are shown for the current Viewport ID (See viewport_id for details).
 
void setShowFiducials (bool toEnable, int viewport_id)
 Sets whether fiducials should be displayed for the given Viewport ID.
 
void setShowFiducials (bool toEnable)
 Sets whether fiducials should be displayed for the current Viewport ID (See viewport_id for details).
 
bool getLinkedState ()
 Returns whether view states are linked between viewports.
 

Detailed Description

Manipulate and control the display within the slice view.

viewport_id: Uniquely identifies a viewport pane used to render a view into the data. For example: Slice View has 3 Viewport IDs where as TileView and MultiView can have many more. The ID corresponds to the position of the view in the list of views.

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

Member Function Documentation

◆ getActive() [1/2]

bool getActive ( int  data_id)
inline

Return whether the given data ID is active (visible) for the current Viewport ID (See viewport_id for details).

Parameters
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
Returns
Whether the given Data is active in the current viewport.

◆ getActive() [2/2]

bool getActive ( int  viewport_id,
int  data_id 
)

Return whether the given data ID is active (visible) for the provided Viewport ID.

Parameters
viewport_idViewport index. See viewport_id for details.
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
Returns
Whether the given Data and Viewport is active.

◆ getCropStyle()

CropView getCropStyle ( int  viewport_id)

Returns the crop style for the given Viewport ID.

Parameters
viewport_idViewport index. See viewport_id for details.
Returns
The crop style (NONE=0, DASHED=1, FILLED=2)

◆ getIntensity() [1/2]

float getIntensity ( int  data_id)
inline

Get the intensity of the view for the given Data ID in the current Viewport ID (See viewport_id for details).

Parameters
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
Returns
The intensity of the view.

◆ getIntensity() [2/2]

float getIntensity ( int  viewport_id,
int  data_id 
)

Get the intensity of the view.

Parameters
viewport_idViewport index. See viewport_id for details.
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
Returns
The intensity of the view for the data specified.

◆ getMax()

int getMax ( int  i)
inline

Get the maximum index of a slice in a given plane of view.

Parameters
iThe index of the plane (Sagittal=0, Coronal=1, Transverse=2) in which you are interested.
Returns
The maximum slice number available for view

◆ getPos() [1/2]

int getPos ( int  a)
inline

Get the index of the slice currently open in the view (usually shown by a crosshair.)

Parameters
aThe index of the plane (Sagittal=0, Coronal=1, Transverse=2) in which you are interested.
Returns
The slice index of the slice currently open in the plane specified.

◆ getPos() [2/2]

int getPos ( int  id,
int  a 
)

Get the index of the slice currently open in the view (usually shown by a crosshair.)

Parameters
idThe index of the data in which you are interested.
aThe index of the plane (Sagittal=0, Coronal=1, Transverse=2) in which you are interested.
Returns
The slice index of the slice currently open for the data in the plane specified.

◆ getShowAnnotations()

bool getShowAnnotations ( int  viewport_id)

Returns whether annotations are shown for the given Viewport ID.

Parameters
viewport_idViewport index. See viewport_id for details.

◆ getShowFiducials()

bool getShowFiducials ( int  viewport_id)

Returns whether fiducials are shown for the given Viewport ID.

Parameters
viewport_idViewport index. See viewport_id for details.

◆ getShowROIs()

bool getShowROIs ( int  viewport_id)

Returns whether ROIs are shown for the given Viewport ID (See viewport_id for details).

Parameters
viewport_idViewport index. See viewport_id for details.

◆ setActive() [1/2]

void setActive ( int  data_id,
bool  visible 
)
inline

Sets the visibility of a dataset for the specified ID for the current Viewport ID (See viewport_id for details). If Link Views is checked, it will be applied to all.

Parameters
data_idUnique dataset identifier (Reference=0, Input1=1, Input2=2).
visibleWhether the dataset should be visible (true) or hidden (false).

◆ setActive() [2/2]

void setActive ( int  data_id,
bool  visible,
int  viewport_id 
)

Sets the visibility of a dataset for the specified Data and Viewport ID.

Parameters
data_idUnique dataset identifier (Reference=0, Input1=1, Input2=2).
visibleWhether the dataset should be visible (true) or hidden (false).
viewport_idViewport index. If Link Views is checked, it will be applied to all. See viewport_id for details.

◆ setCropStyle()

void setCropStyle ( CropView  style,
int  id 
)

Set the crop style for all datasets.

Parameters
styleThe crop style (NONE=0, DASHED=1, FILLED=2)
idNot used

◆ setIntensity() [1/2]

void setIntensity ( int  data_id,
float  intensity 
)
inline

Set intensity component for a Data ID in the current Viewport ID (See viewport_id for details).

Parameters
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
intensityNew intensity value (0..1 float)

◆ setIntensity() [2/2]

void setIntensity ( int  data_id,
float  intensity,
int  viewport_id 
)

Set intensity component for a given Data and Viewport ID.

Parameters
data_idUnique data identifier (Reference=0, Input1=1, Input2=2)
intensityNew intensity value (0..1 float)
viewport_idViewport index. If Link Views is checked, intensity will be applied to all. See viewport_id for details.

◆ setNumber()

void setNumber ( int  dims[3])

Set ranges for the slice view axes. If the current position is invalid in the new ranges, the position will be recentered.

Parameters
dimsthe number of voxels along each image dimension

◆ setPos() [1/4]

void setPos ( int *  coordinates)
inline

Set the slice coordinates from an array for the current Viewport ID (See viewport_id for details).

Parameters
coordinatesPointer to 3 ints (x,y,z).

◆ setPos() [2/4]

void setPos ( int *  coordinates,
int  viewport_id 
)

Set the slice coordinates from an array for the given Viewport ID.

Parameters
coordinatesPointer to 3 ints (x,y,z).
viewport_idViewport index. If Link Views is checked, it will be applied to all. See viewport_id for details.

◆ setPos() [3/4]

void setPos ( int  plane,
int  pos 
)
inline

Set a single slice coordinate in a plane for the current Viewport ID (See viewport_id for details).

Parameters
planeThe index of the plane (Sagittal=0, Coronal=1, Transverse=2)
posNew slice position.

◆ setPos() [4/4]

void setPos ( int  plane,
int  pos,
int  viewport_id 
)

Set a single slice coordinate in a plane for the current Viewport ID.

Parameters
planeThe index of the plane (Sagittal=0, Coronal=1, Transverse=2)
posNew slice position.
viewport_idViewport index. If Link Views is checked, it will be applied to all. See viewport_id for details.

◆ setShowAnnotations()

void setShowAnnotations ( bool  toShow,
int  id 
)

Show/hide annotations for all datasets.

Parameters
toShowWhether the annotations should be visible (true) or hidden (false).
idNot used.

◆ setShowFiducials() [1/2]

void setShowFiducials ( bool  toEnable)
inline

Sets whether fiducials should be displayed for the current Viewport ID (See viewport_id for details).

Parameters
toEnableIf true, fiducials will be shown; if false, they will be hidden.

◆ setShowFiducials() [2/2]

void setShowFiducials ( bool  toEnable,
int  viewport_id 
)

Sets whether fiducials should be displayed for the given Viewport ID.

Parameters
toEnableIf true, fiducials will be shown; if false, they will be hidden.
viewport_idViewport index. If Link Views is checked, it will be applied to all. See viewport_id for details.

◆ setShowROIs()

void setShowROIs ( bool  toShow,
int  viewport_id 
)

Show/hide ROIs for the specified Viewport ID.

Parameters
toShowWhether the ROIs should be visible (true) or hidden (false).
viewport_idViewport index. If Link Views is checked, it will be applied to all. See viewport_id for details.