13 #ifndef ML_TVIRTUAL_VOLUME_H
14 #define ML_TVIRTUAL_VOLUME_H
229 _convenienceInstance =
nullptr;
241 bool areExceptionsOn=
false)
247 _init(*_convenienceInstance);
260 bool areExceptionsOn =
false)
267 _init(*_convenienceInstance);
276 delete _convenienceInstance;
277 _convenienceInstance =
nullptr;
305 inline void setCursorValue(DATATYPE val);
308 inline DATATYPE getCursorValue();
347 bool moveCursorXWrapAround();
391 template <
typename OUTDTYPE>
394 bool maskValue =
true,
395 bool writeBK =
false,
396 OUTDTYPE bkVal = ml_cast_from_scalar<OUTDTYPE>(0))
399 const ImageVector vvCursorPos(getCursorPosition());
411 for (p.
u = box.
v1.
u; p.
u <= box.
v2.
u; p.
u++){
412 for (p.
t = box.
v1.
t; p.
t <= box.
v2.
t; p.
t++){
413 for (p.
c = box.
v1.
c; p.
c <= box.
v2.
c; p.
c++){
414 for (p.
z = box.
v1.
z; p.
z <= box.
v2.
z; p.
z++){
415 for (p.
y = box.
v1.
y; p.
y <= box.
v2.
y; p.
y++){
424 setCursorPosition(p);
430 for (; p.
x <= box.
v2.
x; p.
x++){
435 *oP =
static_cast<OUTDTYPE
>(getCursorValue());
439 if (writeBK){ *oP =bkVal; }
462 setCursorPosition(vvCursorPos);
525 #if ML_DEPRECATED_SINCE(3,5,0)
534 bool areExceptionsOn=
false,
bool useOutConnectors=
false)
537 if (useOutConnectors) {
542 _convenienceInstance =
new VirtualVolume(image,
546 _init(*_convenienceInstance);
550 inline ML_DEPRECATED void copyToSubImg(TSubImage<DATATYPE> &outSubImg) { copyToSubImage(outSubImg); }
578 inline ML_DEPRECATED void setCursorVoxel(DATATYPE val) { setCursorValue(val); }
582 inline ML_DEPRECATED DATATYPE getCursorVoxel() {
return getCursorValue(); }
623 inline ML_DEPRECATED bool moveCursorFXLF() {
return moveCursorXWrapAround(); }
644 static ML_DEPRECATED MLint getIntCursorVoxelW (
void *vv) {
return getIntCursorValueWrapped(vv); }
647 static ML_DEPRECATED MLint64 getInt64CursorVoxelW (
void *vv) {
return getInt64CursorValueWrapped(vv); }
650 static ML_DEPRECATED MLdouble getDoubleCursorVoxelW (
void *vv) {
return getDoubleCursorValueWrapped(vv); }
653 static ML_DEPRECATED MLldouble getLDoubleCursorVoxelW(
void *vv) {
return getLDoubleCursorValueWrapped(vv); }
677 static ML_DEPRECATED void setIntCursorVoxelW (
void *vv,
MLint v) { setIntCursorValueWrapped(vv, v); }
680 static ML_DEPRECATED void setInt64CursorVoxelW (
void *vv,
MLint64 v) { setInt64CursorValueWrapped(vv, v); }
683 static ML_DEPRECATED void setDoubleCursorVoxelW (
void *vv,
MLdouble v) { setDoubleCursorValueWrapped(vv, v); }
686 static ML_DEPRECATED void setLDoubleCursorVoxelW(
void *vv,
MLldouble v) { setLDoubleCursorValueWrapped(vv, v); }
701 static ML_DEPRECATED void moveFXW (
void *vv) { moveCursorXWrapped(vv); }
704 static ML_DEPRECATED void moveFYW (
void *vv) { moveCursorYWrapped(vv); }
707 static ML_DEPRECATED void moveFZW (
void *vv) { moveCursorZWrapped(vv); }
710 static ML_DEPRECATED void moveFCW (
void *vv) { moveCursorCWrapped(vv); }
713 static ML_DEPRECATED void moveFTW (
void *vv) { moveCursorTWrapped(vv); }
716 static ML_DEPRECATED void moveFUW (
void *vv) { moveCursorUWrapped(vv); }
719 static ML_DEPRECATED void moveBXW (
void *vv) { reverseMoveCursorXWrapped(vv); }
722 static ML_DEPRECATED void moveBYW (
void *vv) { reverseMoveCursorYWrapped(vv); }
725 static ML_DEPRECATED void moveBZW (
void *vv) { reverseMoveCursorZWrapped(vv); }
728 static ML_DEPRECATED void moveBCW (
void *vv) { reverseMoveCursorCWrapped(vv); }
731 static ML_DEPRECATED void moveBTW (
void *vv) { reverseMoveCursorTWrapped(vv); }
734 static ML_DEPRECATED void moveBUW (
void *vv) { reverseMoveCursorUWrapped(vv); }
740 static ML_DEPRECATED void resetCursorW (
void *vv) { resetCursorWrapped(vv); }
743 static ML_DEPRECATED bool moveCursorFXLFW (
void *vv) {
return moveCursorXWrapAroundWrapped(vv); }
767 void _init(VirtualVolume &vVol);
789 inline DATATYPE _getVoxel1D (
const ImageVector &pos);
790 inline DATATYPE _getVoxel2D (
const ImageVector &pos);
791 inline DATATYPE _getVoxel3D (
const ImageVector &pos);
792 inline DATATYPE _getVoxel4D (
const ImageVector &pos);
793 inline DATATYPE _getVoxel5D (
const ImageVector &pos);
794 inline DATATYPE _getVoxel6D (
const ImageVector &pos);
796 inline DATATYPE _getVoxel1DE(
const ImageVector &pos);
797 inline DATATYPE _getVoxel2DE(
const ImageVector &pos);
798 inline DATATYPE _getVoxel3DE(
const ImageVector &pos);
799 inline DATATYPE _getVoxel4DE(
const ImageVector &pos);
800 inline DATATYPE _getVoxel5DE(
const ImageVector &pos);
801 inline DATATYPE _getVoxel6DE(
const ImageVector &pos);
813 inline void _setVoxel1D (
const ImageVector &pos, DATATYPE voxVal);
814 inline void _setVoxel2D (
const ImageVector &pos, DATATYPE voxVal);
815 inline void _setVoxel3D (
const ImageVector &pos, DATATYPE voxVal);
816 inline void _setVoxel4D (
const ImageVector &pos, DATATYPE voxVal);
817 inline void _setVoxel5D (
const ImageVector &pos, DATATYPE voxVal);
818 inline void _setVoxel6D (
const ImageVector &pos, DATATYPE voxVal);
820 inline void _setVoxel1DE(
const ImageVector &pos, DATATYPE voxVal);
821 inline void _setVoxel2DE(
const ImageVector &pos, DATATYPE voxVal);
822 inline void _setVoxel3DE(
const ImageVector &pos, DATATYPE voxVal);
823 inline void _setVoxel4DE(
const ImageVector &pos, DATATYPE voxVal);
824 inline void _setVoxel5DE(
const ImageVector &pos, DATATYPE voxVal);
825 inline void _setVoxel6DE(
const ImageVector &pos, DATATYPE voxVal);
836 inline bool _isMapped1D (
const ImageVector &pos)
const;
837 inline bool _isMapped2D (
const ImageVector &pos)
const;
838 inline bool _isMapped3D (
const ImageVector &pos)
const;
839 inline bool _isMapped4D (
const ImageVector &pos)
const;
840 inline bool _isMapped5D (
const ImageVector &pos)
const;
841 inline bool _isMapped6D (
const ImageVector &pos)
const;
843 inline bool _isMapped1DE(
const ImageVector &pos)
const;
844 inline bool _isMapped2DE(
const ImageVector &pos)
const;
845 inline bool _isMapped3DE(
const ImageVector &pos)
const;
846 inline bool _isMapped4DE(
const ImageVector &pos)
const;
847 inline bool _isMapped5DE(
const ImageVector &pos)
const;
848 inline bool _isMapped6DE(
const ImageVector &pos)
const;
914 inline void _setCursorPos1D (
const ImageVector & p);
915 inline void _setCursorPos2D (
const ImageVector & p);
916 inline void _setCursorPos3D (
const ImageVector & p);
917 inline void _setCursorPos4D (
const ImageVector & p);
918 inline void _setCursorPos5D (
const ImageVector & p);
919 inline void _setCursorPos6D (
const ImageVector & p);
921 inline void _setCursorPos1DE(
const ImageVector & p);
922 inline void _setCursorPos2DE(
const ImageVector & p);
923 inline void _setCursorPos3DE(
const ImageVector & p);
924 inline void _setCursorPos4DE(
const ImageVector & p);
925 inline void _setCursorPos5DE(
const ImageVector & p);
926 inline void _setCursorPos6DE(
const ImageVector & p);
959 inline void _moveCursorOffset1D (
const ImageVector & p);
960 inline void _moveCursorOffset2D (
const ImageVector & p);
961 inline void _moveCursorOffset3D (
const ImageVector & p);
962 inline void _moveCursorOffset4D (
const ImageVector & p);
963 inline void _moveCursorOffset5D (
const ImageVector & p);
964 inline void _moveCursorOffset6D (
const ImageVector & p);
966 inline void _moveCursorOffset1DE(
const ImageVector & p);
967 inline void _moveCursorOffset2DE(
const ImageVector & p);
968 inline void _moveCursorOffset3DE(
const ImageVector & p);
969 inline void _moveCursorOffset4DE(
const ImageVector & p);
970 inline void _moveCursorOffset5DE(
const ImageVector & p);
971 inline void _moveCursorOffset6DE(
const ImageVector & p);
1015 inline void _moveFX() { _cPos.x++; _cIdx +=
static_cast<MLuint>(_pStrides.x);
if ((_cPos.x & _idxMask.x) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.x); } }
1016 inline void _moveFY() { _cPos.y++; _cIdx +=
static_cast<MLuint>(_pStrides.y);
if ((_cPos.y & _idxMask.y) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.y); } }
1017 inline void _moveFZ() { _cPos.z++; _cIdx +=
static_cast<MLuint>(_pStrides.z);
if ((_cPos.z & _idxMask.z) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.z); } }
1018 inline void _moveFC() { _cPos.c++; _cIdx +=
static_cast<MLuint>(_pStrides.c);
if ((_cPos.c & _idxMask.c) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.c); } }
1019 inline void _moveFT() { _cPos.t++; _cIdx +=
static_cast<MLuint>(_pStrides.t);
if ((_cPos.t & _idxMask.t) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.t); } }
1020 inline void _moveFU() { _cPos.u++; _cIdx +=
static_cast<MLuint>(_pStrides.u);
if ((_cPos.u & _idxMask.u) == 0){ _cPageIdx +=
static_cast<MLuint>(_strides.u); } }
1054 inline void _moveBX() { _cPos.x--; _cIdx -=
static_cast<MLuint>(_pStrides.x);
if ((_cPos.x & _idxMask.x) == _idxMask.x){ _cPageIdx -=
static_cast<MLuint>(_strides.x); } }
1055 inline void _moveBY() { _cPos.y--; _cIdx -=
static_cast<MLuint>(_pStrides.y);
if ((_cPos.y & _idxMask.y) == _idxMask.y){ _cPageIdx -=
static_cast<MLuint>(_strides.y); } }
1056 inline void _moveBZ() { _cPos.z--; _cIdx -=
static_cast<MLuint>(_pStrides.z);
if ((_cPos.z & _idxMask.z) == _idxMask.z){ _cPageIdx -=
static_cast<MLuint>(_strides.z); } }
1057 inline void _moveBC() { _cPos.c--; _cIdx -=
static_cast<MLuint>(_pStrides.c);
if ((_cPos.c & _idxMask.c) == _idxMask.c){ _cPageIdx -=
static_cast<MLuint>(_strides.c); } }
1058 inline void _moveBT() { _cPos.t--; _cIdx -=
static_cast<MLuint>(_pStrides.t);
if ((_cPos.t & _idxMask.t) == _idxMask.t){ _cPageIdx -=
static_cast<MLuint>(_strides.t); } }
1059 inline void _moveBU() { _cPos.u--; _cIdx -=
static_cast<MLuint>(_pStrides.u);
if ((_cPos.u & _idxMask.u) == _idxMask.u){ _cPageIdx -=
static_cast<MLuint>(_strides.u); } }
1063 #define _VV_MOVEBE_TEST(Q) if (_cPos.Q >= 0){ _cPageIdx -= static_cast<MLuint>(_strides.Q); } \
1064 else{ _cPos.Q++; _cIdx += static_cast<MLuint>(_pStrides.Q); throw(ML_OUT_OF_RANGE); }
1073 #undef _VV_MOVEBE_TEST
1150 GetVoxelFunc _getVoxelFunc;
1153 SetVoxelFunc _setVoxelFunc;
1156 IsMappedFunc _isMappedFunc;
1159 SetCursorPosFunc _setCursorPosFunc;
1162 MoveCursorOffsetFunc _moveCursorOffsetFunc;
1166 MoveCursorPosFunc _moveFXFunc;
1167 MoveCursorPosFunc _moveFYFunc;
1168 MoveCursorPosFunc _moveFZFunc;
1169 MoveCursorPosFunc _moveFCFunc;
1170 MoveCursorPosFunc _moveFTFunc;
1171 MoveCursorPosFunc _moveFUFunc;
1173 MoveCursorPosFunc _moveBXFunc;
1174 MoveCursorPosFunc _moveBYFunc;
1175 MoveCursorPosFunc _moveBZFunc;
1176 MoveCursorPosFunc _moveBCFunc;
1177 MoveCursorPosFunc _moveBTFunc;
1178 MoveCursorPosFunc _moveBUFunc;
1208 template <
typename DATATYPE>
1211 for (
MLuint c=0; c < num; c++){
1212 *results = _getVoxelFunc(
this, *pos);
1218 template <
typename DATATYPE>
1222 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[_cIdx] = val;
1227 template <
typename DATATYPE>
1231 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[_cIdx];
1235 template <
typename DATATYPE>
1239 _setCursorPosFunc(
this, zeroPos);
1251 template <
typename DATATYPE>
1254 if (_cPos.x < _extD.x){ _moveFXFunc(
this);
return true; }
1256 if (_cPos.y < _extD.y){ _moveFYFunc(
this); }
1258 if (_cPos.z < _extD.z){ _moveFZFunc(
this); }
1260 if (_cPos.c < _extD.c){ _moveFCFunc(
this); }
1262 if (_cPos.t < _extD.t){ _moveFTFunc(
this); }
1264 if (_cPos.u < _extD.u){ _moveFUFunc(
this); }
1281 _setCursorPosFunc(
this, _cPos);
1287 template <
typename DATATYPE>
1298 for (p.
u=subImgBox.
v1.
u; p.
u<=subImgBox.
v2.
u; p.
u++){
1299 for (p.
t=subImgBox.
v1.
t; p.
t<=subImgBox.
v2.
t; p.
t++){
1300 for (p.
c=subImgBox.
v1.
c; p.
c<=subImgBox.
v2.
c; p.
c++){
1301 for (p.
z=subImgBox.
v1.
z; p.
z<=subImgBox.
v2.
z; p.
z++){
1302 for (p.
y=subImgBox.
v1.
y; p.
y<=subImgBox.
v2.
y; p.
y++){
1303 for (p.
x=subImgBox.
v1.
x; p.
x<=subImgBox.
v2.
x; p.
x++){
1316 template <
typename DATATYPE>
1325 template <
typename DATATYPE>
1340 tvvBox.
v1 = srcBox.
v1 + pos;
1341 tvvBox.
v2 = srcBox.
v2 + pos;
1348 for (dPos.
u=dstBox.
v1.
u, sPos.
u = srcBox.
v1.
u; dPos.
u<=dstBox.
v2.
u; dPos.
u++, sPos.
u++){
1349 for (dPos.
t=dstBox.
v1.
t, sPos.
t = srcBox.
v1.
t; dPos.
t<=dstBox.
v2.
t; dPos.
t++, sPos.
t++){
1350 for (dPos.
c=dstBox.
v1.
c, sPos.
c = srcBox.
v1.
c; dPos.
c<=dstBox.
v2.
c; dPos.
c++, sPos.
c++){
1351 for (dPos.
z=dstBox.
v1.
z, sPos.
z = srcBox.
v1.
z; dPos.
z<=dstBox.
v2.
z; dPos.
z++, sPos.
z++){
1352 for (dPos.
y=dstBox.
v1.
y, sPos.
y = srcBox.
v1.
y; dPos.
y<=dstBox.
v2.
y; dPos.
y++, sPos.
y++){
1353 for (dPos.
x=dstBox.
v1.
x, sPos.
x = srcBox.
v1.
x; dPos.
x<=dstBox.
v2.
x; dPos.
x++, sPos.
x++){
1366 template <
typename DATATYPE>
1373 "Mismatch of data type of virtual volume and template typename");
1379 _ext = vVol._origVolumeExt;
1381 _pageArray = vVol._pageArray;
1382 _rShift = vVol._rShift;
1383 _strides = vVol._strides;
1384 _pStrides = vVol._pStrides;
1385 _idxMask = vVol._idxMask;
1386 _useExc = vVol._areExceptionsOn;
1399 _moveFXFunc = _moveFXCBE;
1400 _moveFYFunc = _moveFYCBE;
1401 _moveFZFunc = _moveFZCBE;
1402 _moveFCFunc = _moveFCCBE;
1403 _moveFTFunc = _moveFTCBE;
1404 _moveFUFunc = _moveFUCBE;
1406 _moveBXFunc = _moveBXCBE;
1407 _moveBYFunc = _moveBYCBE;
1408 _moveBZFunc = _moveBZCBE;
1409 _moveBCFunc = _moveBCCBE;
1410 _moveBTFunc = _moveBTCBE;
1411 _moveBUFunc = _moveBUCBE;
1416 _getVoxelFunc = _getVoxel1DCBE;
1417 _setVoxelFunc = _setVoxel1DCBE;
1418 _setCursorPosFunc = _setCursorPos1DCBE;
1419 _moveCursorOffsetFunc = _moveCursorOffset1DCBE;
1420 _isMappedFunc = _isMapped1DCBE;
1423 _getVoxelFunc = _getVoxel2DCBE;
1424 _setVoxelFunc = _setVoxel2DCBE;
1425 _setCursorPosFunc = _setCursorPos2DCBE;
1426 _moveCursorOffsetFunc = _moveCursorOffset2DCBE;
1427 _isMappedFunc = _isMapped2DCBE;
1430 _getVoxelFunc = _getVoxel3DCBE;
1431 _setVoxelFunc = _setVoxel3DCBE;
1432 _setCursorPosFunc = _setCursorPos3DCBE;
1433 _moveCursorOffsetFunc = _moveCursorOffset3DCBE;
1434 _isMappedFunc = _isMapped3DCBE;
1437 _getVoxelFunc = _getVoxel4DCBE;
1438 _setVoxelFunc = _setVoxel4DCBE;
1439 _setCursorPosFunc = _setCursorPos4DCBE;
1440 _moveCursorOffsetFunc = _moveCursorOffset4DCBE;
1441 _isMappedFunc = _isMapped4DCBE;
1444 _getVoxelFunc = _getVoxel5DCBE;
1445 _setVoxelFunc = _setVoxel5DCBE;
1446 _setCursorPosFunc = _setCursorPos5DCBE;
1447 _moveCursorOffsetFunc = _moveCursorOffset5DCBE;
1448 _isMappedFunc = _isMapped5DCBE;
1451 _getVoxelFunc = _getVoxel6DCBE;
1452 _setVoxelFunc = _setVoxel6DCBE;
1453 _setCursorPosFunc = _setCursorPos6DCBE;
1454 _moveCursorOffsetFunc = _moveCursorOffset6DCBE;
1455 _isMappedFunc = _isMapped6DCBE;
1458 _getVoxelFunc = _getVoxel6DCBE;
1459 _setVoxelFunc = _setVoxel6DCBE;
1460 _moveCursorOffsetFunc = _moveCursorOffset6DCBE;
1461 _setCursorPosFunc = _setCursorPos6DCBE;
1462 _isMappedFunc = _isMapped6DCBE;
1463 _virtVol->invalidate();
1471 _moveFXFunc = _moveFXCB;
1472 _moveFYFunc = _moveFYCB;
1473 _moveFZFunc = _moveFZCB;
1474 _moveFCFunc = _moveFCCB;
1475 _moveFTFunc = _moveFTCB;
1476 _moveFUFunc = _moveFUCB;
1478 _moveBXFunc = _moveBXCB;
1479 _moveBYFunc = _moveBYCB;
1480 _moveBZFunc = _moveBZCB;
1481 _moveBCFunc = _moveBCCB;
1482 _moveBTFunc = _moveBTCB;
1483 _moveBUFunc = _moveBUCB;
1488 _getVoxelFunc = _getVoxel1DCB;
1489 _setVoxelFunc = _setVoxel1DCB;
1490 _setCursorPosFunc = _setCursorPos1DCB;
1491 _moveCursorOffsetFunc = _moveCursorOffset1DCB;
1492 _isMappedFunc = _isMapped1DCB;
1495 _getVoxelFunc = _getVoxel2DCB;
1496 _setVoxelFunc = _setVoxel2DCB;
1497 _setCursorPosFunc = _setCursorPos2DCB;
1498 _moveCursorOffsetFunc = _moveCursorOffset2DCB;
1499 _isMappedFunc = _isMapped2DCB;
1502 _getVoxelFunc = _getVoxel3DCB;
1503 _setVoxelFunc = _setVoxel3DCB;
1504 _setCursorPosFunc = _setCursorPos3DCB;
1505 _moveCursorOffsetFunc = _moveCursorOffset3DCB;
1506 _isMappedFunc = _isMapped3DCB;
1509 _getVoxelFunc = _getVoxel4DCB;
1510 _setVoxelFunc = _setVoxel4DCB;
1511 _setCursorPosFunc = _setCursorPos4DCB;
1512 _moveCursorOffsetFunc = _moveCursorOffset4DCB;
1513 _isMappedFunc = _isMapped4DCB;
1516 _getVoxelFunc = _getVoxel5DCB;
1517 _setVoxelFunc = _setVoxel5DCB;
1518 _setCursorPosFunc = _setCursorPos5DCB;
1519 _moveCursorOffsetFunc = _moveCursorOffset5DCB;
1520 _isMappedFunc = _isMapped5DCB;
1523 _getVoxelFunc = _getVoxel6DCB;
1524 _setVoxelFunc = _setVoxel6DCB;
1525 _setCursorPosFunc = _setCursorPos6DCB;
1526 _moveCursorOffsetFunc = _moveCursorOffset6DCB;
1527 _isMappedFunc = _isMapped6DCB;
1530 _getVoxelFunc = _getVoxel6DCB;
1531 _setVoxelFunc = _setVoxel6DCB;
1532 _setCursorPosFunc = _setCursorPos6DCB;
1533 _moveCursorOffsetFunc = _moveCursorOffset6DCB;
1534 _isMappedFunc = _isMapped6DCBE;
1535 _virtVol->invalidate();
1543 template <
typename DATATYPE>
1550 _pageArray =
nullptr;
1554 _getVoxelFunc =
nullptr;
1555 _setVoxelFunc =
nullptr;
1556 _setCursorPosFunc =
nullptr;
1557 _moveCursorOffsetFunc =
nullptr;
1558 _isMappedFunc =
nullptr;
1559 _moveFXFunc =
nullptr;
1560 _moveFYFunc =
nullptr;
1561 _moveFZFunc =
nullptr;
1562 _moveFCFunc =
nullptr;
1563 _moveFTFunc =
nullptr;
1564 _moveFUFunc =
nullptr;
1565 _moveBXFunc =
nullptr;
1566 _moveBYFunc =
nullptr;
1567 _moveBZFunc =
nullptr;
1568 _moveBCFunc =
nullptr;
1569 _moveBTFunc =
nullptr;
1570 _moveBUFunc =
nullptr;
1585 template <
typename DATATYPE>
1588 PageBuffer *
const page = _pageArray + (pos.
x >> _rShift.x);
1589 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x];
1593 template <
typename DATATYPE>
1598 PageBuffer *
const page = _pageArray + (px >> _rShift.x);
1599 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px];
1604 template <
typename DATATYPE>
1607 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) + (pos.
y >> _rShift.y)*_strides.y);
1608 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x+ pos.
y*_pStrides.y];
1612 template <
typename DATATYPE>
1617 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y)){
throw(
ML_OUT_OF_RANGE); }
1618 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) + (py >> _rShift.y)*_strides.y);
1619 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px+ py*_pStrides.y];
1625 template <
typename DATATYPE>
1628 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1629 (pos.
y >> _rShift.y)*_strides.y +
1630 (pos.
z >> _rShift.z)*_strides.z);
1631 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x + pos.
y*_pStrides.y + pos.
z*_pStrides.z];
1635 template <
typename DATATYPE>
1641 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1643 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1644 (py >> _rShift.y)*_strides.y +
1645 (pz >> _rShift.z)*_strides.z);
1646 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px + py*_pStrides.y + pz*_pStrides.z];
1652 template <
typename DATATYPE>
1655 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1656 (pos.
y >> _rShift.y)*_strides.y +
1657 (pos.
z >> _rShift.z)*_strides.z +
1658 (pos.
c >> _rShift.c)*_strides.c);
1659 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1666 template <
typename DATATYPE>
1673 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1674 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c)){
throw(
ML_OUT_OF_RANGE); }
1675 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1676 (py >> _rShift.y)*_strides.y +
1677 (pz >> _rShift.z)*_strides.z +
1678 (pc >> _rShift.c)*_strides.c);
1679 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1686 template <
typename DATATYPE>
1689 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1690 (pos.
y >> _rShift.y)*_strides.y +
1691 (pos.
z >> _rShift.z)*_strides.z +
1692 (pos.
c >> _rShift.c)*_strides.c +
1693 (pos.
t >> _rShift.t)*_strides.t);
1694 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1702 template <
typename DATATYPE>
1710 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1711 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
1713 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1714 (py >> _rShift.y)*_strides.y +
1715 (pz >> _rShift.z)*_strides.z +
1716 (pc >> _rShift.c)*_strides.c +
1717 (pt >> _rShift.t)*_strides.t);
1718 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1726 template <
typename DATATYPE>
1729 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1730 (pos.
y >> _rShift.y)*_strides.y +
1731 (pos.
z >> _rShift.z)*_strides.z +
1732 (pos.
c >> _rShift.c)*_strides.c +
1733 (pos.
t >> _rShift.t)*_strides.t +
1734 (pos.
u >> _rShift.u)*_strides.u);
1735 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1744 template <
typename DATATYPE>
1753 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1754 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
1755 (pt < 0) || (pt >= _ext.t) || (pu < 0) || (pu >= _ext.u)){
throw(
ML_OUT_OF_RANGE); }
1756 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1757 (py >> _rShift.y)*_strides.y +
1758 (pz >> _rShift.z)*_strides.z +
1759 (pc >> _rShift.c)*_strides.c +
1760 (pt >> _rShift.t)*_strides.t +
1761 (pu >> _rShift.u)*_strides.u);
1762 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1779 template <
typename DATATYPE>
1782 PageBuffer *
const page = _pageArray + (pos.
x >> _rShift.x);
1784 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x] = voxVal;
1788 template <
typename DATATYPE>
1793 PageBuffer *
const page = _pageArray + (px >> _rShift.x);
1795 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px] = voxVal;
1801 template <
typename DATATYPE>
1804 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) + (pos.
y >> _rShift.y)*_strides.y);
1806 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x + pos.
y*_pStrides.y] = voxVal;
1810 template <
typename DATATYPE>
1815 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y)){
throw(
ML_OUT_OF_RANGE); }
1816 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) + (py >> _rShift.y)*_strides.y);
1818 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px + py*_pStrides.y] = voxVal;
1824 template <
typename DATATYPE>
1827 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1828 (pos.
y >> _rShift.y)*_strides.y +
1829 (pos.
z >> _rShift.z)*_strides.z);
1831 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x + pos.
y*_pStrides.y + pos.
z*_pStrides.z] = voxVal;
1835 template <
typename DATATYPE>
1841 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1843 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1844 (py >> _rShift.y)*_strides.y +
1845 (pz >> _rShift.z)*_strides.z);
1847 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px + py*_pStrides.y + pz*_pStrides.z] = voxVal;
1853 template <
typename DATATYPE>
1856 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1857 (pos.
y >> _rShift.y)*_strides.y +
1858 (pos.
z >> _rShift.z)*_strides.z +
1859 (pos.
c >> _rShift.c)*_strides.c);
1861 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1864 pos.
c*_pStrides.c] = voxVal;
1868 template <
typename DATATYPE>
1875 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1876 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c)){
throw(
ML_OUT_OF_RANGE); }
1877 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1878 (py >> _rShift.y)*_strides.y +
1879 (pz >> _rShift.z)*_strides.z +
1880 (pc >> _rShift.c)*_strides.c);
1882 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1885 pc*_pStrides.c] = voxVal;
1891 template <
typename DATATYPE>
1894 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1895 (pos.
y >> _rShift.y)*_strides.y +
1896 (pos.
z >> _rShift.z)*_strides.z +
1897 (pos.
c >> _rShift.c)*_strides.c +
1898 (pos.
t >> _rShift.t)*_strides.t);
1900 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1904 pos.
t*_pStrides.t] = voxVal;
1908 template <
typename DATATYPE>
1916 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1917 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
1919 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1920 (py >> _rShift.y)*_strides.y +
1921 (pz >> _rShift.z)*_strides.z +
1922 (pc >> _rShift.c)*_strides.c +
1923 (pt >> _rShift.t)*_strides.t);
1925 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1929 pt*_pStrides.t] = voxVal;
1935 template <
typename DATATYPE>
1938 PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
1939 (pos.
y >> _rShift.y)*_strides.y +
1940 (pos.
z >> _rShift.z)*_strides.z +
1941 (pos.
c >> _rShift.c)*_strides.c +
1942 (pos.
t >> _rShift.t)*_strides.t +
1943 (pos.
u >> _rShift.u)*_strides.u);
1945 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.
x +
1950 pos.
u*_pStrides.u] = voxVal;
1954 template <
typename DATATYPE>
1963 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
1964 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
1965 (pt < 0) || (pt >= _ext.t) || (pu < 0) || (pu >= _ext.u)){
throw(
ML_OUT_OF_RANGE); }
1966 PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
1967 (py >> _rShift.y)*_strides.y +
1968 (pz >> _rShift.z)*_strides.z +
1969 (pc >> _rShift.c)*_strides.c +
1970 (pt >> _rShift.t)*_strides.t +
1971 (pu >> _rShift.u)*_strides.u);
1973 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[px +
1978 pu*_pStrides.u] = voxVal;
1991 template <
typename DATATYPE>
1995 _cIdx =
static_cast<MLuint>(p.
x);
1996 _cPageIdx =
static_cast<MLuint>(p.
x >> _rShift.x);
2000 template <
typename DATATYPE>
2006 _cIdx =
static_cast<MLuint>(px);
2007 _cPageIdx =
static_cast<MLuint>(px >> _rShift.x);
2013 template <
typename DATATYPE>
2018 _cIdx =
static_cast<MLuint>(p.
x + p.
y*_pStrides.y);
2019 _cPageIdx =
static_cast<MLuint>((p.
x >> _rShift.x) +
2020 (p.
y >> _rShift.y)*_strides.y);
2024 template <
typename DATATYPE>
2029 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y)){
throw(
ML_OUT_OF_RANGE); }
2032 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y);
2033 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2034 (py >> _rShift.y)*_strides.y);
2040 template <
typename DATATYPE>
2046 _cIdx =
static_cast<MLuint>(p.
x + p.
y*_pStrides.y + p.
z*_pStrides.z);
2047 _cPageIdx =
static_cast<MLuint>((p.
x >> _rShift.x) +
2048 (p.
y >> _rShift.y)*_strides.y +
2049 (p.
z >> _rShift.z)*_strides.z);
2053 template <
typename DATATYPE>
2059 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2064 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z);
2065 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2066 (py >> _rShift.y)*_strides.y +
2067 (pz >> _rShift.z)*_strides.z);
2073 template <
typename DATATYPE>
2080 _cIdx =
static_cast<MLuint>(p.
x + p.
y*_pStrides.y + p.
z*_pStrides.z + p.
c*_pStrides.c);
2081 _cPageIdx =
static_cast<MLuint>((p.
x >> _rShift.x) +
2082 (p.
y >> _rShift.y)*_strides.y +
2083 (p.
z >> _rShift.z)*_strides.z +
2084 (p.
c >> _rShift.c)*_strides.c);
2088 template <
typename DATATYPE>
2095 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2096 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c)){
throw(
ML_OUT_OF_RANGE); }
2101 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z + pc*_pStrides.c);
2102 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2103 (py >> _rShift.y)*_strides.y +
2104 (pz >> _rShift.z)*_strides.z +
2105 (pc >> _rShift.c)*_strides.c);
2111 template <
typename DATATYPE>
2118 _cIdx =
static_cast<MLuint>(p.
x + p.
y*_pStrides.y + p.
z*_pStrides.z + p.
c*_pStrides.c + p.
t*_pStrides.t);
2121 _cPageIdx =
static_cast<MLuint>((p.
x >> _rShift.x) +
2122 (p.
y >> _rShift.y)*_strides.y +
2123 (p.
z >> _rShift.z)*_strides.z +
2124 (p.
c >> _rShift.c)*_strides.c +
2125 (p.
t >> _rShift.t)*_strides.t);
2129 template <
typename DATATYPE>
2137 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2138 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2145 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z + pc*_pStrides.c + pt*_pStrides.t);
2148 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2149 (py >> _rShift.y)*_strides.y +
2150 (pz >> _rShift.z)*_strides.z +
2151 (pc >> _rShift.c)*_strides.c +
2152 (pt >> _rShift.t)*_strides.t);
2158 template <
typename DATATYPE>
2165 _cIdx =
static_cast<MLuint>(p.
x + p.
y*_pStrides.y + p.
z*_pStrides.z +
2166 p.
c*_pStrides.c + p.
t*_pStrides.t + p.
u*_pStrides.u);
2169 _cPageIdx =
static_cast<MLuint>((p.
x >> _rShift.x) +
2170 (p.
y >> _rShift.y)*_strides.y +
2171 (p.
z >> _rShift.z)*_strides.z +
2172 (p.
c >> _rShift.c)*_strides.c +
2173 (p.
t >> _rShift.t)*_strides.t +
2174 (p.
u >> _rShift.u)*_strides.u);
2178 template <
typename DATATYPE>
2187 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2188 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2189 (pt < 0) || (pt >= _ext.t) || (pu < 0) || (pu >= _ext.u)){
throw(
ML_OUT_OF_RANGE); }
2195 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z +
2196 pc*_pStrides.c + pt*_pStrides.t + pu*_pStrides.u);
2199 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2200 (py >> _rShift.y)*_strides.y +
2201 (pz >> _rShift.z)*_strides.z +
2202 (pc >> _rShift.c)*_strides.c +
2203 (pt >> _rShift.t)*_strides.t +
2204 (pu >> _rShift.u)*_strides.u);
2217 template <
typename DATATYPE>
2221 _cIdx =
static_cast<MLuint>(_cPos.x);
2222 _cPageIdx =
static_cast<MLuint>(_cPos.x >> _rShift.x);
2226 template <
typename DATATYPE>
2229 const MLint px = _cPos.x + off.
x;
2232 _cIdx =
static_cast<MLuint>(px);
2233 _cPageIdx =
static_cast<MLuint>(px >> _rShift.x);
2239 template <
typename DATATYPE>
2244 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y*_pStrides.y);
2245 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y)*_strides.y);
2249 template <
typename DATATYPE>
2252 const MLint px = _cPos.x + off.
x;
2253 const MLint py = _cPos.y + off.
y;
2254 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y)){
throw(
ML_OUT_OF_RANGE); }
2257 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y);
2258 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) + (py >> _rShift.y)*_strides.y);
2264 template <
typename DATATYPE>
2270 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y*_pStrides.y + _cPos.z*_pStrides.z);
2271 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) +
2272 (_cPos.y >> _rShift.y)*_strides.y +
2273 (_cPos.z >> _rShift.z)*_strides.z);
2277 template <
typename DATATYPE>
2280 const MLint px = _cPos.x+off.
x;
2281 const MLint py = _cPos.y+off.
y;
2282 const MLint pz = _cPos.z+off.
z;
2283 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2288 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z);
2289 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2290 (py >> _rShift.y)*_strides.y +
2291 (pz >> _rShift.z)*_strides.z);
2297 template <
typename DATATYPE>
2304 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y*_pStrides.y + _cPos.z*_pStrides.z + _cPos.c*_pStrides.c);
2305 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) +
2306 (_cPos.y >> _rShift.y)*_strides.y +
2307 (_cPos.z >> _rShift.z)*_strides.z +
2308 (_cPos.c >> _rShift.c)*_strides.c);
2312 template <
typename DATATYPE>
2315 const MLint px = _cPos.x + off.
x;
2316 const MLint py = _cPos.y + off.
y;
2317 const MLint pz = _cPos.z + off.
z;
2318 const MLint pc = _cPos.c + off.
c;
2319 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2320 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c)){
throw(
ML_OUT_OF_RANGE); }
2325 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z + pc*_pStrides.c);
2326 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2327 (py >> _rShift.y)*_strides.y +
2328 (pz >> _rShift.z)*_strides.z +
2329 (pc >> _rShift.c)*_strides.c);
2335 template <
typename DATATYPE>
2342 _cIdx =
static_cast<MLuint>(_cPos.x +
2343 _cPos.y*_pStrides.y + _cPos.z*_pStrides.z +
2344 _cPos.c*_pStrides.c + _cPos.t*_pStrides.t);
2347 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) +
2348 (_cPos.y >> _rShift.y)*_strides.y +
2349 (_cPos.z >> _rShift.z)*_strides.z +
2350 (_cPos.c >> _rShift.c)*_strides.c +
2351 (_cPos.t >> _rShift.t)*_strides.t);
2355 template <
typename DATATYPE>
2358 const MLint px = _cPos.x + off.
x;
2359 const MLint py = _cPos.y + off.
y;
2360 const MLint pz = _cPos.z + off.
z;
2361 const MLint pc = _cPos.c + off.
c;
2362 const MLint pt = _cPos.t + off.
t;
2363 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2364 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2368 _cPos.set(px,py,pz,pc,pt,0);
2371 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z + pc*_pStrides.c + pt*_pStrides.t);
2374 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) +
2375 (py >> _rShift.y)*_strides.y +
2376 (pz >> _rShift.z)*_strides.z +
2377 (pc >> _rShift.c)*_strides.c +
2378 (pt >> _rShift.t)*_strides.t);
2384 template <
typename DATATYPE>
2391 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y*_pStrides.y + _cPos.z*_pStrides.z +
2392 _cPos.c*_pStrides.c + _cPos.t*_pStrides.t + _cPos.u*_pStrides.u);
2395 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) +
2396 (_cPos.y >> _rShift.y)*_strides.y +
2397 (_cPos.z >> _rShift.z)*_strides.z +
2398 (_cPos.c >> _rShift.c)*_strides.c +
2399 (_cPos.t >> _rShift.t)*_strides.t +
2400 (_cPos.u >> _rShift.u)*_strides.u);
2404 template <
typename DATATYPE>
2407 const MLint px = _cPos.x + off.
x;
2408 const MLint py = _cPos.y + off.
y;
2409 const MLint pz = _cPos.z + off.
z;
2410 const MLint pc = _cPos.c + off.
c;
2411 const MLint pt = _cPos.t + off.
t;
2412 const MLint pu = _cPos.u + off.
u;
2413 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2414 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2415 (pt < 0) || (pt >= _ext.t) || (pu < 0) || (pu >= _ext.u)){
throw(
ML_OUT_OF_RANGE); }
2418 _cPos.set(px,py,pz,pc,pt,pu);
2421 _cIdx =
static_cast<MLuint>(px + py*_pStrides.y + pz*_pStrides.z +
2422 pc*_pStrides.c + pt*_pStrides.t + pu*_pStrides.u);
2425 _cPageIdx =
static_cast<MLuint>((px >> _rShift.x) + (py >> _rShift.y)*_strides.y +
2426 (pz >> _rShift.z)*_strides.z + (pc >> _rShift.c)*_strides.c +
2427 (pt >> _rShift.t)*_strides.t + (pu >> _rShift.u)*_strides.u);
2439 template <
typename DATATYPE>
2442 const PageBuffer *
const page = _pageArray + (pos.
x >> _rShift.x);
2443 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2447 template <
typename DATATYPE>
2452 const PageBuffer *
const page = _pageArray + (px >> _rShift.x);
2453 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2459 template <
typename DATATYPE>
2462 const PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) + (pos.
y >> _rShift.y)*_strides.y);
2463 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2467 template <
typename DATATYPE>
2472 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y)){
throw(
ML_OUT_OF_RANGE); }
2473 const PageBuffer *
const page = _pageArray + ((px >> _rShift.x) + (py >> _rShift.y)*_strides.y);
2474 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2480 template <
typename DATATYPE>
2483 const PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
2484 (pos.
y >> _rShift.y)*_strides.y +
2485 (pos.
z >> _rShift.z)*_strides.z);
2486 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2490 template <
typename DATATYPE>
2496 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2498 const PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
2499 (py >> _rShift.y)*_strides.y +
2500 (pz >> _rShift.z)*_strides.z);
2501 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2507 template <
typename DATATYPE>
2510 const PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
2511 (pos.
y >> _rShift.y)*_strides.y +
2512 (pos.
z >> _rShift.z)*_strides.z +
2513 (pos.
c >> _rShift.c)*_strides.c);
2514 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2518 template <
typename DATATYPE>
2525 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2526 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c)){
throw(
ML_OUT_OF_RANGE); }
2527 const PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
2528 (py >> _rShift.y)*_strides.y +
2529 (pz >> _rShift.z)*_strides.z +
2530 (pc >> _rShift.c)*_strides.c);
2531 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2537 template <
typename DATATYPE>
2540 const PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
2541 (pos.
y >> _rShift.y)*_strides.y +
2542 (pos.
z >> _rShift.z)*_strides.z +
2543 (pos.
c >> _rShift.c)*_strides.c +
2544 (pos.
t >> _rShift.t)*_strides.t);
2545 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2549 template <
typename DATATYPE>
2557 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2558 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2560 const PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
2561 (py >> _rShift.y)*_strides.y +
2562 (pz >> _rShift.z)*_strides.z +
2563 (pc >> _rShift.c)*_strides.c +
2564 (pt >> _rShift.t)*_strides.t);
2565 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2571 template <
typename DATATYPE>
2574 const PageBuffer *
const page = _pageArray + ((pos.
x >> _rShift.x) +
2575 (pos.
y >> _rShift.y)*_strides.y +
2576 (pos.
z >> _rShift.z)*_strides.z +
2577 (pos.
c >> _rShift.c)*_strides.c +
2578 (pos.
t >> _rShift.t)*_strides.t +
2579 (pos.
u >> _rShift.u)*_strides.u);
2580 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2584 template <
typename DATATYPE>
2593 if ((px < 0) || (px >= _ext.x) || (py < 0) || (py >= _ext.y) ||
2594 (pz < 0) || (pz >= _ext.z) || (pc < 0) || (pc >= _ext.c) ||
2595 (pt < 0) || (pt >= _ext.t) || (pu < 0) || (pu >= _ext.u)){
throw(
ML_OUT_OF_RANGE); }
2596 const PageBuffer *
const page = _pageArray + ((px >> _rShift.x) +
2597 (py >> _rShift.y)*_strides.y +
2598 (pz >> _rShift.z)*_strides.z +
2599 (pc >> _rShift.c)*_strides.c +
2600 (pt >> _rShift.t)*_strides.t +
2601 (pu >> _rShift.u)*_strides.u);
2602 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
Class to manage a binary image.
bool getCursorValue() const
Return true if bit under cursor is true, otherwise false. Never throws controlled diagnostic exceptio...
const ImageVector & getCursorPosition() const
Return current cursor position. Never throws controlled diagnostic exceptions.
void setCursorPosition(const ImageVector &pos)
const ImageVector & getExtent() const
Return image size. Never throws controlled diagnostic exceptions.
Base class for an image processing module of the ML.
PagedImage * getOutputImage(MLint outputIndex=0) const
Returns output image outputIndex. The index needs to be in the range [0, getNumOutputImages()-1].
PagedImage * getUpdatedInputImage(MLint inputIndex, bool getReal=false) const
Convenience method for safe access to the input image at index inputIndex.
Class which represents an image, which manages properties of an image and image data which is located...
SubImageBox getBoxFromImageExtent() const
const SubImageBox & getBox() const
Returns the box describing the origin/extent of the subimage.
VectorType v1
Corner v1 of the subimage region (included in region).
static TSubImageBox< intT > intersect(const TSubImageBox< intT > &box1, const TSubImageBox< intT > &box2)
Returns the overlapping region of subimage regions box1 and box2.
VectorType v2
Corner v2 of the subimage region (also included in region!).
This template class manages/represents a rectangular 6d image region in memory which is organized lin...
const DATATYPE * getImagePointer(const ImageVector &position) const
Returns a pointer to voxel data of image voxel at 6d position position relative to the begin of the c...
DATATYPE getSubImageValue(const ImageVector &position) const
Returns voxel value at the given position where position is relative to the origin of the subimage re...
ComponentType c
Color component of the vector.
ComponentType t
Time component of the vector.
ComponentType u
Unit/Modality/User component of the vector.
ComponentType z
Z component of the vector.
ComponentType x
X component of the vector.
ComponentType y
Y component of the vector.
The TVirtualVolume class implements random access to a paged input image or a pure virtual image with...
static void _moveFZCB(TVirtualVolume *obj)
static void _setVoxel4DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void setInt64ValueWrapped(void *vv, const ImageVector &pos, MLint64 v)
static void _moveBUCBE(TVirtualVolume *obj)
static MLdouble getDoubleCursorValueWrapped(void *vv)
static void _moveCursorOffset3DCB(TVirtualVolume *obj, const ImageVector &p)
static void _moveFYCBE(TVirtualVolume *obj)
static bool _isMapped5DCB(const TVirtualVolume *obj, const ImageVector &pos)
virtual ~TVirtualVolume()
Destructor.
static void _setVoxel6DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static bool _isMapped4DCBE(const TVirtualVolume *obj, const ImageVector &pos)
void reverseMoveCursorZ()
void setCursorPosition(const ImageVector &pos)
Set the cursor to a certain position.
static void _moveCursorOffset2DCBE(TVirtualVolume *obj, const ImageVector &p)
static MLint64 getInt64ValueWrapped(void *vv, const ImageVector &pos)
void _setVoxel6DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
static void reverseMoveCursorUWrapped(void *vv)
static void _setCursorPos4DCB(TVirtualVolume *obj, const ImageVector &p)
static void setIntValueWrapped(void *vv, const ImageVector &pos, MLint v)
static void setDoubleValueWrapped(void *vv, const ImageVector &pos, MLdouble v)
static void _moveBXCB(TVirtualVolume *obj)
void _moveCursorOffset2DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
DATATYPE _getVoxel2D(const ImageVector &pos)
Get voxel method for a certain dimension. (2d)
static void _setCursorPos3DCB(TVirtualVolume *obj, const ImageVector &p)
static void fillDoubleWrapped(void *vv, const ImageVector &v1, const ImageVector &v2, MLdouble v)
static void _setCursorPos6DCB(TVirtualVolume *obj, const ImageVector &p)
static MLdouble getDoubleValueWrapped(void *vv, const ImageVector &pos)
static void setDoubleCursorValueWrapped(void *vv, MLdouble v)
void reverseMoveCursorT()
DATATYPE _getVoxel4DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
static void reverseMoveCursorCWrapped(void *vv)
DATATYPE _getVoxel6D(const ImageVector &pos)
Get voxel method for a certain dimension. (6d)
static bool _isMapped2DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static MLint64 getInt64CursorValueWrapped(void *vv)
static void setLDoubleCursorValueWrapped(void *vv, MLldouble v)
static void fillLDoubleWrapped(void *vv, const ImageVector &v1, const ImageVector &v2, MLldouble v)
DATATYPE _getVoxel1DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
static DATATYPE _getVoxel3DCBE(TVirtualVolume *obj, const ImageVector &pos)
void _setCursorPos2D(const ImageVector &p)
Set cursor position for a certain dimension. (2d)
bool _isMapped3D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
static void _moveBTCB(TVirtualVolume *obj)
static void _setVoxel3DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
void _setCursorPos3D(const ImageVector &p)
Set cursor position for a certain dimension. (3d)
static bool _isMapped1DCB(const TVirtualVolume *obj, const ImageVector &pos)
DATATYPE ComponentType
A typedef to "export" the type of voxels components.
void _setCursorPos6D(const ImageVector &p)
Set cursor position for a certain dimension. (6d)
static void reverseMoveCursorZWrapped(void *vv)
TVirtualVolume()
Hide the default constructor to avoid incorrect usage due to missing initializations.
static DATATYPE _getVoxel1DCBE(TVirtualVolume *obj, const ImageVector &pos)
static void setIntCursorValueWrapped(void *vv, MLint v)
bool _isMapped4D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
void _setVoxel2DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
static void setCursorPositionWrapped(void *vv, const ImageVector &pos)
static void _moveCursorOffset3DCBE(TVirtualVolume *obj, const ImageVector &p)
static MLint getIntCursorValueWrapped(void *vv)
static void _moveFTCB(TVirtualVolume *obj)
static void _setCursorPos5DCBE(TVirtualVolume *obj, const ImageVector &p)
static MLint getIntValueWrapped(void *vv, const ImageVector &pos)
Wrapper functions for non template application interfaces.
static const ImageVector & getCursorPositionWrapped(void *vv)
void _setVoxel3DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
void _setVoxel4DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
static void moveCursorByOffsetWrapped(void *vv, const ImageVector &off)
static void _moveCursorOffset1DCB(TVirtualVolume *obj, const ImageVector &p)
void _setCursorPos4DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
static DATATYPE _getVoxel4DCBE(TVirtualVolume *obj, const ImageVector &pos)
static void _moveFYCB(TVirtualVolume *obj)
static void moveCursorUWrapped(void *vv)
static void moveCursorYWrapped(void *vv)
void _setVoxel4D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (4d)
static bool isMappedWrapped(void *vv, const ImageVector &pos)
static void moveCursorTWrapped(void *vv)
static bool _isMapped6DCB(const TVirtualVolume *obj, const ImageVector &pos)
static void _setVoxel5DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void _setCursorPos3DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _setCursorPos2DCBE(TVirtualVolume *obj, const ImageVector &p)
bool _isMapped1DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
void _setCursorPos5DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
bool _isMapped3DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
static void _setVoxel6DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
void _setVoxel6D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (6d)
static void _moveCursorOffset5DCBE(TVirtualVolume *obj, const ImageVector &p)
void _setVoxel3D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (3d)
static void _moveBXCBE(TVirtualVolume *obj)
static void _moveBCCBE(TVirtualVolume *obj)
static void _moveFXCBE(TVirtualVolume *obj)
bool _isMapped2DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
DATATYPE _getVoxel2DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
static void _moveFUCBE(TVirtualVolume *obj)
void copyMaskToSubImage(TSubImage< OUTDTYPE > &outSubImg, BitImage &maskBits, bool maskValue=true, bool writeBK=false, OUTDTYPE bkVal=ml_cast_from_scalar< OUTDTYPE >(0))
Takes overlapping region from *this, outSubImg and maskBits and copies all voxels from *this to outSu...
static DATATYPE _getVoxel4DCB(TVirtualVolume *obj, const ImageVector &pos)
static bool _isMapped3DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static void moveCursorXWrapped(void *vv)
static void _moveCursorOffset5DCB(TVirtualVolume *obj, const ImageVector &p)
void _setVoxel1DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
TVirtualVolume(const ImageVector &ext, MLdouble fillVal=0, MLint maxNumKB=-1, bool areExceptionsOn=false)
Convenience constructor (3) creating an untyped virtual volume inside the typed one to avoid addition...
static bool _isMapped1DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static void _setVoxel1DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
void _moveCursorOffset6D(const ImageVector &p)
Move cursor by an offset to a new position. (6d)
void _moveCursorOffset5DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
static void _moveBTCBE(TVirtualVolume *obj)
static bool _isMapped6DCBE(const TVirtualVolume *obj, const ImageVector &pos)
VirtualVolume & getVirtualVolume()
Returns the pointer to the wrapped untyped virtual volume.
static void _setVoxel2DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void reverseMoveCursorTWrapped(void *vv)
static bool _isMapped2DCB(const TVirtualVolume *obj, const ImageVector &pos)
void _moveCursorOffset4DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
static void resetCursorWrapped(void *vv)
void _setVoxel1D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (1d)
void reverseMoveCursorU()
static void _moveFZCBE(TVirtualVolume *obj)
DATATYPE getValue(const ImageVector &pos)
Get a voxel value from the virtual volume.
static void fillIntWrapped(void *vv, const ImageVector &v1, const ImageVector &v2, MLint v)
static void _setCursorPos6DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _moveFCCB(TVirtualVolume *obj)
DATATYPE _getVoxel5D(const ImageVector &pos)
Get voxel method for a certain dimension. (5d)
void _setVoxel2D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (2d)
TVirtualVolume & operator=(const TVirtualVolume &)
Hide the default assignment operator to avoid incorrect usage due to missing initializations.
static void _setCursorPos2DCB(TVirtualVolume *obj, const ImageVector &p)
static void _setCursorPos1DCB(TVirtualVolume *obj, const ImageVector &p)
static void _setVoxel4DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void moveCursorCWrapped(void *vv)
bool _isMapped5D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
void _moveCursorOffset1DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
static bool _isMapped5DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static DATATYPE _getVoxel1DCB(TVirtualVolume *obj, const ImageVector &pos)
static void _setCursorPos4DCBE(TVirtualVolume *obj, const ImageVector &p)
DATATYPE * getWrittenPageData(MLuint32 wp) const
Returns typed pointer to data of written page with page id wp.
static void _moveBYCB(TVirtualVolume *obj)
static DATATYPE _getVoxel6DCBE(TVirtualVolume *obj, const ImageVector &pos)
static DATATYPE _getVoxel2DCB(TVirtualVolume *obj, const ImageVector &pos)
static bool moveCursorXWrapAroundWrapped(void *vv)
void reverseMoveCursorY()
static void moveCursorZWrapped(void *vv)
static void setInt64CursorValueWrapped(void *vv, MLint64 v)
void _setCursorPos1DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
static void _moveBUCB(TVirtualVolume *obj)
static bool _isMapped4DCB(const TVirtualVolume *obj, const ImageVector &pos)
bool _isMapped5DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
TVirtualVolume(PagedImage *image, MLint maxNumKB=-1, bool areExceptionsOn=false)
Convenience constructor (2) creating an untyped virtual volume inside the typed one to avoid addition...
static void _setCursorPos1DCBE(TVirtualVolume *obj, const ImageVector &p)
static DATATYPE _getVoxel2DCBE(TVirtualVolume *obj, const ImageVector &pos)
static DATATYPE _getVoxel5DCBE(TVirtualVolume *obj, const ImageVector &pos)
static void _moveFXCB(TVirtualVolume *obj)
static void _moveBZCBE(TVirtualVolume *obj)
TVirtualVolume(VirtualVolume &vVol)
Constructor 1.
static void fillInt64Wrapped(void *vv, const ImageVector &v1, const ImageVector &v2, MLint64 v)
static DATATYPE _getVoxel6DCB(TVirtualVolume *obj, const ImageVector &pos)
bool _isMapped6D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
DATATYPE _getVoxel4D(const ImageVector &pos)
Get voxel method for a certain dimension. (4d)
static void _moveCursorOffset1DCBE(TVirtualVolume *obj, const ImageVector &p)
void _moveCursorOffset5D(const ImageVector &p)
Move cursor by an offset to a new position. (5d)
void _setVoxel5DE(const ImageVector &pos, DATATYPE voxVal)
Set voxel at a position for a certain dimension with testing and exception throw if necessary....
bool _isMapped1D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
bool _isMapped4DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
void _setVoxel5D(const ImageVector &pos, DATATYPE voxVal)
Set voxel method for a certain dimension. (5d)
static void _moveBCCB(TVirtualVolume *obj)
void _moveCursorOffset4D(const ImageVector &p)
Move cursor by an offset to a new position. (4d)
void _moveCursorOffset3D(const ImageVector &p)
Move cursor by an offset to a new position. (3d)
static void _setVoxel5DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
DATATYPE _getVoxel1D(const ImageVector &pos)
Get voxel method for a certain dimension. (1d)
static void _moveCursorOffset2DCB(TVirtualVolume *obj, const ImageVector &p)
static MLldouble getLDoubleValueWrapped(void *vv, const ImageVector &pos)
DATATYPE _getVoxel6DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
static void _moveCursorOffset6DCB(TVirtualVolume *obj, const ImageVector &p)
static void _moveFCCBE(TVirtualVolume *obj)
DATATYPE _getVoxel3D(const ImageVector &pos)
Get voxel method for a certain dimension. (3d)
void _setCursorPos1D(const ImageVector &p)
Set cursor position for a certain dimension. (1d)
static void _moveFTCBE(TVirtualVolume *obj)
static void _moveBZCB(TVirtualVolume *obj)
static bool _isMapped3DCB(const TVirtualVolume *obj, const ImageVector &pos)
bool _isMapped6DE(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
void reverseMoveCursorX()
static void reverseMoveCursorXWrapped(void *vv)
void setValue(const ImageVector &pos, DATATYPE data)
Write a voxel into the virtual volume.
static void _moveCursorOffset6DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _moveFUCB(TVirtualVolume *obj)
static void _moveCursorOffset4DCB(TVirtualVolume *obj, const ImageVector &p)
void _moveCursorOffset2D(const ImageVector &p)
Move cursor by an offset to a new position. (2d)
void _setCursorPos5D(const ImageVector &p)
Set cursor position for a certain dimension. (5d)
void _moveCursorOffset6DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
bool isMapped(const ImageVector &pos) const
Returns true if voxel is mapped into memory, otherwise it returns false.
static void _setVoxel1DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
void moveCursorByOffset(const ImageVector &off)
Shift cursor to current position + offset.
static void _moveBYCBE(TVirtualVolume *obj)
void copyToSubImage(TSubImage< DATATYPE > &outSubImg)
Copy area from the virtual volume into the subimage given by outSubImg.
static DATATYPE _getVoxel3DCB(TVirtualVolume *obj, const ImageVector &pos)
void _setCursorPos2DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
static void reverseMoveCursorYWrapped(void *vv)
static void _moveCursorOffset4DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _setVoxel3DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void _setVoxel2DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static MLldouble getLDoubleCursorValueWrapped(void *vv)
void _setCursorPos3DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
void _setCursorPos4D(const ImageVector &p)
Set cursor position for a certain dimension. (4d)
static DATATYPE _getVoxel5DCB(TVirtualVolume *obj, const ImageVector &pos)
const ImageVector & getCursorPosition() const
Return the current cursor coordinates.
bool _isMapped2D(const ImageVector &pos) const
Returns true if voxel is mapped in memory for a certain dimension, otherwise false....
DATATYPE _getVoxel5DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
static void _setCursorPos5DCB(TVirtualVolume *obj, const ImageVector &p)
void _setCursorPos6DE(const ImageVector &p)
Set cursor position for a certain dimension with testing and exception throw if necessary....
void _moveCursorOffset3DE(const ImageVector &p)
Move cursor by an offset to a new position with testing and exception throw if necessary....
void reverseMoveCursorC()
static void setLDoubleValueWrapped(void *vv, const ImageVector &pos, MLldouble v)
DATATYPE _getVoxel3DE(const ImageVector &pos)
Get voxel at a position for a certain dimension with testing and exception throw if necessary....
void _moveCursorOffset1D(const ImageVector &p)
Move cursor by an offset to a new position. (1d)
This class manages a virtual volume organizing efficient voxel access to the output image of an input...
MLint getDim() const
Return dimension of specified volume.
MLDataType getDataType() const
Return data type enum.
#define ML_BAD_DATA_TYPE
A wrong or unexpected data type has been passed to an algorithm which often is a programming error; t...
#define ML_BAD_DIMENSION
he image or data structure has wrong extent or dimensions.
#define ML_OUT_OF_RANGE
Any coordinate or value is out of range, often a voxel address which is outside of an image or it is ...
#define ML_PRINT_FATAL_ERROR(FUNC_NAME, REASON, HANDLING)
Like ML_PRINT_FATAL_ERROR_DUMP(FUNC_NAME, REASON, HANDLING, RT_OBJ) without a runtime object to be du...
#define ML_PRINT_ERROR(FUNC_NAME, REASON, HANDLING)
Like ML_PRINT_ERROR_DUMP(FUNC_NAME, REASON, HANDLING, RT_OBJ) without a runtime object to be dumped.
#define _VV_MOVEBE_TEST(Q)
Macro to save cursor movement with exception handling if outside image.
MLDataType MLGetDataTypeFromPtr(const T *)
MLuint64 MLuint
An unsigned ML integer type with at least 64 bits used for index calculations on very large images ev...
INT64 MLint64
Include 64 bit integer support for Windows or Unix.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
MLWEM_EXPORT void intersect(WEMTrianglePatch *inPatch1, WEMTrianglePatch *inPatch2, WEMTrianglePatch *outPatch, unsigned int outputMode, TriangulationModes triangulationMode, WEMVector< WEMCut > *cuts=nullptr)
Returns the intersection of the given patches.
TSubImageBox< MLint > SubImageBox
Define the standard SubImageBox type used in the ML. Its size varies with the size of the MLint type.
TImageVector< MLint > ImageVector
Defines the standard ImageVector type which is used by the ML for indexing and coordinates.
PageBuffer is a helper structure to manage one page of input data of the VirtualVolume class and it a...
ReturnPageFunc _getPageFkt
Pointer to function to return the page managed by the PageBuffer.
bool _locked
If true this page contains written data and must not be removed.