VivoQuant 6.4.0
Loading...
Searching...
No Matches
MultiViewer Class Reference

Description

Customizable view to allow various layout configurations of the displayed data.

This object can be used to configure the layout of the Multi View. It can also be used to change the selected data and the view plane. It also allows to change the hanging protocol used. Actions can be taken while any operators is loaded.

Rows and columns are indexed from 0. Select this view with VQ.mainWin().setViewMode(), then obtain it with VQ.currentView().

VQ.mainWin().setViewMode("Multi View"); // switch to the multi view mode
var multiView = VQ.currentView();

Public Member Functions

bool setLayoutSize (int rows, int cols)
 Reshape the layout (all merge will be lost).
bool resetLayout ()
 resetLayout Reset the layout to 1x1 and reset all data/plane.
bool setHangProtocol (string name)
 Sets to the specified hanging protocol.
bool setPlane (int row, int col, int plane)
 Adjust plane located at row,col.
bool setData (int row, int col, int viewIndex, Index dataIndex)
 Select an image used at the specified viewport.
bool removeData (int row, int col, int viewIndex)
 Remove an image used at the specified viewport.
int getDataID (int row, int col, int viewIndex)
 Get DataList/DataManager top-level image indice for a specific viewport.
string getDataIndexString (int row, int col, int viewIndex)
 Get DataList/DataManager images index as a string for a specific viewport.
int getPlaneID (int row, int col)
 Get the plane ID at row,col (0:Coronal, 1:Sagittal, 2:Transverse).
int getActiveRows ()
 Get the number of rows in the layout.
int getActiveColumns ()
 Get the number of columns in the layout.
int getMaxDim ()
 Get the maximum possible dimension for row and col.
bool isMerged (int row, int col)
 Check if the layout at row,col is a merged viewport.
bool merge (int row, int col, int rowSpan, int colSpan)
 Merge the viewport at row,col (A span of 1 means no merge).
bool split (int row, int col)
 Split the merged viewport at row,col.
bool fullView (int row, int col, bool enabled)
 Sets the viewport at row,col to full view.
int getSaveImageIndex (int row, int col)
 Gets the index of the viewport at row,col to be used with saveImage() .
void showAllROIs (bool enabled)
 Show all ROIs for all the viewport.
void showROIs (int row, int col, bool enabled)
 Show ROIs for specified viewport.
bool isShowingROIs (int row, int col)
 Get Show ROIs state for specified viewport.

Member Function Documentation

◆ fullView()

bool fullView ( int row,
int col,
bool enabled )

Sets the viewport at row,col to full view.

Returns
True if fullview was applied, false otherwise

◆ getActiveColumns()

int getActiveColumns ( )

Get the number of columns in the layout.

Returns
The number of active columns

◆ getActiveRows()

int getActiveRows ( )

Get the number of rows in the layout.

Returns
The number of active rows

◆ getDataID()

int getDataID ( int row,
int col,
int viewIndex )

Get DataList/DataManager top-level image indice for a specific viewport.

Parameters
rowrow index in the layout
colcolumn index in the layout
viewIndexshould be 0:Reference, 1:Input1, 2:Input2
Returns
The data index

◆ getDataIndexString()

string getDataIndexString ( int row,
int col,
int viewIndex )

Get DataList/DataManager images index as a string for a specific viewport.

Parameters
rowrow index in the layout
colcolumn index in the layout
viewIndexshould be 0:Reference, 1:Input1, 2:Input2
Returns
The data index string

◆ getMaxDim()

int getMaxDim ( )

Get the maximum possible dimension for row and col.

Returns
The maximum possible dimension

◆ getPlaneID()

int getPlaneID ( int row,
int col )

Get the plane ID at row,col (0:Coronal, 1:Sagittal, 2:Transverse).

Returns
The plane index

◆ getSaveImageIndex()

int getSaveImageIndex ( int row,
int col )

Gets the index of the viewport at row,col to be used with saveImage() .

Returns
The image index to be used

◆ isMerged()

bool isMerged ( int row,
int col )

Check if the layout at row,col is a merged viewport.

Returns
True if viewport is merged, false otherwise

◆ merge()

bool merge ( int row,
int col,
int rowSpan,
int colSpan )

Merge the viewport at row,col (A span of 1 means no merge).

Returns
True if viewport was merged, false otherwise

◆ removeData()

bool removeData ( int row,
int col,
int viewIndex )

Remove an image used at the specified viewport.

Parameters
rowrow index in the layout
colcolumn index in the layout
viewIndexshould be 0:Reference, 1:Input1, 2:Input2
Returns
True if the data was set, false otherwise

◆ resetLayout()

bool resetLayout ( )

resetLayout Reset the layout to 1x1 and reset all data/plane.

Returns
True if the layout was reset, false otherwise

◆ setData()

bool setData ( int row,
int col,
int viewIndex,
Index dataIndex )

Select an image used at the specified viewport.

Parameters
rowrow index in the layout
colcolumn index in the layout
viewIndexshould be 0:Reference, 1:Input1, 2:Input2
dataIndexIndex of data (see VQ.index())
Returns
True if the data was set, false otherwise

◆ setHangProtocol()

bool setHangProtocol ( string name)

Sets to the specified hanging protocol.

Parameters
nameThe hanging protocol name
Returns
True if the hanging protocol was set, false otherwise

◆ setLayoutSize()

bool setLayoutSize ( int rows,
int cols )

Reshape the layout (all merge will be lost).

Parameters
rowsThe number of rows for the layout
colsThe number of columns for the layout
Returns
True if the size is valid, false otherwise

◆ setPlane()

bool setPlane ( int row,
int col,
int plane )

Adjust plane located at row,col.

Parameters
rowrow index in the layout
colcolumn index in the layout
planeshould be 0:Coronal, 1:Sagittal, 2:Transverse
Returns
True if the plane was set, false otherwise

◆ split()

bool split ( int row,
int col )

Split the merged viewport at row,col.

Returns
True if viewport is split, false otherwise