open_iA 2024.9
Loading...
Searching...
No Matches
iASlicerMode.h File Reference
#include "iaguibase_export.h"
#include <QString>

Enumerations

enum  iAAxisIndex { X , Y , Z , AxisCount }
 Index of the coordinate axes, to prevent "magic numbers" in code. More...
 
enum  iASlicerMode { YZ , XZ , XY , SlicerCount }
 Constants for the three axis-aligned slicer modes. More...
 

Functions

iAguibase_API QString axisName (int axis)
 Get the name of the given axis.
 
iAguibase_API int mapGlobalToSliceAxis (int mode, int index)
 
iAguibase_API int mapSliceToGlobalAxis (int mode, int index)
 Map the index of an axis of the slicer to the index of the corresponding global axis.
 
iAguibase_API iAAxisIndex nameToAxis (QString const &name)
 Convert an axis name to the iAAxisIndex enum.
 
iAguibase_API QString slicerModeString (int mode)
 Get the "name" of the given slicer mode (i.e. the slicer plane, "XY" for iASlicerMode XY).
 

Enumeration Type Documentation

◆ iAAxisIndex

Index of the coordinate axes, to prevent "magic numbers" in code.

Enumerator
AxisCount 

◆ iASlicerMode

Constants for the three axis-aligned slicer modes.

Enumerator
YZ 
XZ 
XY 
SlicerCount 

Function Documentation

◆ axisName()

iAguibase_API QString axisName ( int axis)

Get the name of the given axis.

Parameters
axisthe index of the axis (see iAAxisIndex)

◆ mapGlobalToSliceAxis()

iAguibase_API int mapGlobalToSliceAxis ( int mode,
int index )

◆ mapSliceToGlobalAxis()

iAguibase_API int mapSliceToGlobalAxis ( int mode,
int index )

Map the index of an axis of the slicer to the index of the corresponding global axis.

Parameters
modethe slicer mode,
See also
iASlicerMode
Parameters
indexthe slicer axis index (x=0, y=1, z=2),
See also
iAAxisIndex
Returns
the global axis index; for values of index = 0,1,2 it returns:
  • 1, 2, 0 for mode=YZ
  • 0, 2, 1 for mode=XZ
  • 0, 1, 2 for mode=XY

◆ nameToAxis()

iAguibase_API iAAxisIndex nameToAxis ( QString const & name)

Convert an axis name to the iAAxisIndex enum.

◆ slicerModeString()

iAguibase_API QString slicerModeString ( int mode)

Get the "name" of the given slicer mode (i.e. the slicer plane, "XY" for iASlicerMode XY).