VivoQuant
Public Member Functions | List of all members
QMultiViewer Class Reference

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

Public Member Functions

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

Detailed 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. See also ScriptMaster::currentView() to obtain this object.

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 MainWin::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 ScriptMaster::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
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