13#ifndef ML_TVIRTUAL_VOLUME_H
14#define ML_TVIRTUAL_VOLUME_H
233 _convenienceInstance =
nullptr;
246 _convenienceInstance =
248 _init(*_convenienceInstance);
262 _init(*_convenienceInstance);
271 delete _convenienceInstance;
272 _convenienceInstance =
nullptr;
292 return _getVoxelFunc(
this, pos);
299 _setVoxelFunc(
this, pos, data);
305 _setCursorPosFunc(
this, pos);
315 inline void setCursorValue(
DATATYPE val);
323 return _isMappedFunc(
this, pos);
382 _moveCursorOffsetFunc(
this,
off);
399 bool moveCursorXWrapAround();
452 SubImageBox box = SubImageBox::intersect(_virtVol->getBox(), outSubImg.
getBox());
460 for (p.u = box.
v1.u; p.u <= box.
v2.u; p.u++) {
461 for (p.t = box.
v1.t; p.t <= box.
v2.t; p.t++) {
462 for (p.c = box.
v1.c; p.c <= box.
v2.c; p.c++) {
463 for (p.z = box.
v1.z; p.z <= box.
v2.z; p.z++) {
464 for (p.y = box.
v1.y; p.y <= box.
v2.y; p.y++) {
473 setCursorPosition(p);
479 for (; p.x <= box.
v2.x; p.x++) {
484 *
oP =
static_cast<OUTDTYPE>(getCursorValue());
495 if (p.x < box.
v2.x) {
526 return static_cast<DATATYPE*
>(_virtVol->getWrittenPageData(
wp));
778 inline bool _isMapped1D(
const ImageVector& pos)
const;
779 inline bool _isMapped2D(
const ImageVector& pos)
const;
780 inline bool _isMapped3D(
const ImageVector& pos)
const;
781 inline bool _isMapped4D(
const ImageVector& pos)
const;
782 inline bool _isMapped5D(
const ImageVector& pos)
const;
783 inline bool _isMapped6D(
const ImageVector& pos)
const;
785 inline bool _isMapped1DE(
const ImageVector& pos)
const;
786 inline bool _isMapped2DE(
const ImageVector& pos)
const;
787 inline bool _isMapped3DE(
const ImageVector& pos)
const;
788 inline bool _isMapped4DE(
const ImageVector& pos)
const;
789 inline bool _isMapped5DE(
const ImageVector& pos)
const;
790 inline bool _isMapped6DE(
const ImageVector& pos)
const;
804 return obj->_getVoxel1D(pos);
808 return obj->_getVoxel2D(pos);
812 return obj->_getVoxel3D(pos);
816 return obj->_getVoxel4D(pos);
820 return obj->_getVoxel5D(pos);
824 return obj->_getVoxel6D(pos);
829 return obj->_getVoxel1DE(pos);
833 return obj->_getVoxel2DE(pos);
837 return obj->_getVoxel3DE(pos);
841 return obj->_getVoxel4DE(pos);
845 return obj->_getVoxel5DE(pos);
849 return obj->_getVoxel6DE(pos);
904 return obj->_isMapped1D(pos);
908 return obj->_isMapped2D(pos);
912 return obj->_isMapped3D(pos);
916 return obj->_isMapped4D(pos);
920 return obj->_isMapped5D(pos);
924 return obj->_isMapped6D(pos);
929 return obj->_isMapped1DE(pos);
933 return obj->_isMapped2DE(pos);
937 return obj->_isMapped3DE(pos);
941 return obj->_isMapped4DE(pos);
945 return obj->_isMapped5DE(pos);
949 return obj->_isMapped6DE(pos);
971 inline void _setCursorPos1DE(
const ImageVector& p);
972 inline void _setCursorPos2DE(
const ImageVector& p);
973 inline void _setCursorPos3DE(
const ImageVector& p);
974 inline void _setCursorPos4DE(
const ImageVector& p);
975 inline void _setCursorPos5DE(
const ImageVector& p);
976 inline void _setCursorPos6DE(
const ImageVector& p);
986 obj->_setCursorPos1D(p);
990 obj->_setCursorPos2D(p);
994 obj->_setCursorPos3D(p);
998 obj->_setCursorPos4D(p);
1002 obj->_setCursorPos5D(p);
1006 obj->_setCursorPos6D(p);
1011 obj->_setCursorPos1DE(p);
1015 obj->_setCursorPos2DE(p);
1019 obj->_setCursorPos3DE(p);
1023 obj->_setCursorPos4DE(p);
1027 obj->_setCursorPos5DE(p);
1031 obj->_setCursorPos6DE(p);
1046 inline void _moveCursorOffset1D(
const ImageVector& p);
1047 inline void _moveCursorOffset2D(
const ImageVector& p);
1048 inline void _moveCursorOffset3D(
const ImageVector& p);
1049 inline void _moveCursorOffset4D(
const ImageVector& p);
1050 inline void _moveCursorOffset5D(
const ImageVector& p);
1051 inline void _moveCursorOffset6D(
const ImageVector& p);
1053 inline void _moveCursorOffset1DE(
const ImageVector& p);
1054 inline void _moveCursorOffset2DE(
const ImageVector& p);
1055 inline void _moveCursorOffset3DE(
const ImageVector& p);
1056 inline void _moveCursorOffset4DE(
const ImageVector& p);
1057 inline void _moveCursorOffset5DE(
const ImageVector& p);
1058 inline void _moveCursorOffset6DE(
const ImageVector& p);
1068 obj->_moveCursorOffset1D(p);
1072 obj->_moveCursorOffset2D(p);
1076 obj->_moveCursorOffset3D(p);
1080 obj->_moveCursorOffset4D(p);
1084 obj->_moveCursorOffset5D(p);
1088 obj->_moveCursorOffset6D(p);
1093 obj->_moveCursorOffset1DE(p);
1097 obj->_moveCursorOffset2DE(p);
1101 obj->_moveCursorOffset3DE(p);
1105 obj->_moveCursorOffset4DE(p);
1109 obj->_moveCursorOffset5DE(p);
1113 obj->_moveCursorOffset6DE(p);
1142 _cIdx +=
static_cast<MLuint>(_pStrides.x);
1143 if ((_cPos.x & _idxMask.x) == 0) {
1144 _cPageIdx +=
static_cast<MLuint>(_strides.x);
1150 _cIdx +=
static_cast<MLuint>(_pStrides.y);
1151 if ((_cPos.y & _idxMask.y) == 0) {
1152 _cPageIdx +=
static_cast<MLuint>(_strides.y);
1158 _cIdx +=
static_cast<MLuint>(_pStrides.z);
1159 if ((_cPos.z & _idxMask.z) == 0) {
1160 _cPageIdx +=
static_cast<MLuint>(_strides.z);
1166 _cIdx +=
static_cast<MLuint>(_pStrides.c);
1167 if ((_cPos.c & _idxMask.c) == 0) {
1168 _cPageIdx +=
static_cast<MLuint>(_strides.c);
1174 _cIdx +=
static_cast<MLuint>(_pStrides.t);
1175 if ((_cPos.t & _idxMask.t) == 0) {
1176 _cPageIdx +=
static_cast<MLuint>(_strides.t);
1182 _cIdx +=
static_cast<MLuint>(_pStrides.u);
1183 if ((_cPos.u & _idxMask.u) == 0) {
1184 _cPageIdx +=
static_cast<MLuint>(_strides.u);
1190 if (_cPos.x < _extD.x) {
1199 if (_cPos.y < _extD.y) {
1208 if (_cPos.z < _extD.z) {
1217 if (_cPos.c < _extD.c) {
1226 if (_cPos.t < _extD.t) {
1235 if (_cPos.u < _extD.u) {
1308 _cIdx -=
static_cast<MLuint>(_pStrides.x);
1309 if ((_cPos.x & _idxMask.x) == _idxMask.x) {
1310 _cPageIdx -=
static_cast<MLuint>(_strides.x);
1316 _cIdx -=
static_cast<MLuint>(_pStrides.y);
1317 if ((_cPos.y & _idxMask.y) == _idxMask.y) {
1318 _cPageIdx -=
static_cast<MLuint>(_strides.y);
1324 _cIdx -=
static_cast<MLuint>(_pStrides.z);
1325 if ((_cPos.z & _idxMask.z) == _idxMask.z) {
1326 _cPageIdx -=
static_cast<MLuint>(_strides.z);
1332 _cIdx -=
static_cast<MLuint>(_pStrides.c);
1333 if ((_cPos.c & _idxMask.c) == _idxMask.c) {
1334 _cPageIdx -=
static_cast<MLuint>(_strides.c);
1340 _cIdx -=
static_cast<MLuint>(_pStrides.t);
1341 if ((_cPos.t & _idxMask.t) == _idxMask.t) {
1342 _cPageIdx -=
static_cast<MLuint>(_strides.t);
1348 _cIdx -=
static_cast<MLuint>(_pStrides.u);
1349 if ((_cPos.u & _idxMask.u) == _idxMask.u) {
1350 _cPageIdx -=
static_cast<MLuint>(_strides.u);
1356#define _VV_MOVEBE_TEST(Q) \
1357 if (_cPos.Q >= 0) { \
1358 _cPageIdx -= static_cast<MLuint>(_strides.Q); \
1362 _cIdx += static_cast<MLuint>(_pStrides.Q); \
1363 throw(ML_OUT_OF_RANGE); \
1370 _cIdx -=
static_cast<MLuint>(_pStrides.x);
1371 if ((_cPos.x & _idxMask.x) == _idxMask.x) {
1378 _cIdx -=
static_cast<MLuint>(_pStrides.y);
1379 if ((_cPos.y & _idxMask.y) == _idxMask.y) {
1386 _cIdx -=
static_cast<MLuint>(_pStrides.z);
1387 if ((_cPos.z & _idxMask.z) == _idxMask.z) {
1394 _cIdx -=
static_cast<MLuint>(_pStrides.c);
1395 if ((_cPos.c & _idxMask.c) == _idxMask.c) {
1402 _cIdx -=
static_cast<MLuint>(_pStrides.t);
1403 if ((_cPos.t & _idxMask.t) == _idxMask.t) {
1410 _cIdx -=
static_cast<MLuint>(_pStrides.u);
1411 if ((_cPos.u & _idxMask.u) == _idxMask.u) {
1415#undef _VV_MOVEBE_TEST
1526 GetVoxelFunc _getVoxelFunc;
1529 SetVoxelFunc _setVoxelFunc;
1532 IsMappedFunc _isMappedFunc;
1535 SetCursorPosFunc _setCursorPosFunc;
1538 MoveCursorOffsetFunc _moveCursorOffsetFunc;
1542 MoveCursorPosFunc _moveFXFunc;
1543 MoveCursorPosFunc _moveFYFunc;
1544 MoveCursorPosFunc _moveFZFunc;
1545 MoveCursorPosFunc _moveFCFunc;
1546 MoveCursorPosFunc _moveFTFunc;
1547 MoveCursorPosFunc _moveFUFunc;
1549 MoveCursorPosFunc _moveBXFunc;
1550 MoveCursorPosFunc _moveBYFunc;
1551 MoveCursorPosFunc _moveBZFunc;
1552 MoveCursorPosFunc _moveBCFunc;
1553 MoveCursorPosFunc _moveBTFunc;
1554 MoveCursorPosFunc _moveBUFunc;
1581template <
typename DATATYPE>
1584 for (
MLuint c = 0; c < num; c++) {
1585 *results = _getVoxelFunc(
this, *pos);
1609 _setCursorPosFunc(
this,
zeroPos);
1623 if (_cPos.x < _extD.x) {
1628 if (_cPos.y < _extD.y) {
1632 if (_cPos.z < _extD.z) {
1636 if (_cPos.c < _extD.c) {
1640 if (_cPos.t < _extD.t) {
1644 if (_cPos.u < _extD.u) {
1663 _setCursorPosFunc(
this, _cPos);
1753 "Mismatch of data type of virtual volume and template typename");
1759 _ext =
vVol._origVolumeExt;
1761 _pageArray =
vVol._pageArray;
1762 _rShift =
vVol._rShift;
1763 _strides =
vVol._strides;
1764 _pStrides =
vVol._pStrides;
1765 _idxMask =
vVol._idxMask;
1766 _useExc =
vVol._areExceptionsOn;
1779 _moveFXFunc = _moveFXCBE;
1780 _moveFYFunc = _moveFYCBE;
1781 _moveFZFunc = _moveFZCBE;
1782 _moveFCFunc = _moveFCCBE;
1783 _moveFTFunc = _moveFTCBE;
1784 _moveFUFunc = _moveFUCBE;
1786 _moveBXFunc = _moveBXCBE;
1787 _moveBYFunc = _moveBYCBE;
1788 _moveBZFunc = _moveBZCBE;
1789 _moveBCFunc = _moveBCCBE;
1790 _moveBTFunc = _moveBTCBE;
1791 _moveBUFunc = _moveBUCBE;
1794 switch (
vVol.getDim()) {
1796 _getVoxelFunc = _getVoxel1DCBE;
1797 _setVoxelFunc = _setVoxel1DCBE;
1798 _setCursorPosFunc = _setCursorPos1DCBE;
1799 _moveCursorOffsetFunc = _moveCursorOffset1DCBE;
1800 _isMappedFunc = _isMapped1DCBE;
1803 _getVoxelFunc = _getVoxel2DCBE;
1804 _setVoxelFunc = _setVoxel2DCBE;
1805 _setCursorPosFunc = _setCursorPos2DCBE;
1806 _moveCursorOffsetFunc = _moveCursorOffset2DCBE;
1807 _isMappedFunc = _isMapped2DCBE;
1810 _getVoxelFunc = _getVoxel3DCBE;
1811 _setVoxelFunc = _setVoxel3DCBE;
1812 _setCursorPosFunc = _setCursorPos3DCBE;
1813 _moveCursorOffsetFunc = _moveCursorOffset3DCBE;
1814 _isMappedFunc = _isMapped3DCBE;
1817 _getVoxelFunc = _getVoxel4DCBE;
1818 _setVoxelFunc = _setVoxel4DCBE;
1819 _setCursorPosFunc = _setCursorPos4DCBE;
1820 _moveCursorOffsetFunc = _moveCursorOffset4DCBE;
1821 _isMappedFunc = _isMapped4DCBE;
1824 _getVoxelFunc = _getVoxel5DCBE;
1825 _setVoxelFunc = _setVoxel5DCBE;
1826 _setCursorPosFunc = _setCursorPos5DCBE;
1827 _moveCursorOffsetFunc = _moveCursorOffset5DCBE;
1828 _isMappedFunc = _isMapped5DCBE;
1831 _getVoxelFunc = _getVoxel6DCBE;
1832 _setVoxelFunc = _setVoxel6DCBE;
1833 _setCursorPosFunc = _setCursorPos6DCBE;
1834 _moveCursorOffsetFunc = _moveCursorOffset6DCBE;
1835 _isMappedFunc = _isMapped6DCBE;
1838 _getVoxelFunc = _getVoxel6DCBE;
1839 _setVoxelFunc = _setVoxel6DCBE;
1840 _moveCursorOffsetFunc = _moveCursorOffset6DCBE;
1841 _setCursorPosFunc = _setCursorPos6DCBE;
1842 _isMappedFunc = _isMapped6DCBE;
1843 _virtVol->invalidate();
1851 _moveFXFunc = _moveFXCB;
1852 _moveFYFunc = _moveFYCB;
1853 _moveFZFunc = _moveFZCB;
1854 _moveFCFunc = _moveFCCB;
1855 _moveFTFunc = _moveFTCB;
1856 _moveFUFunc = _moveFUCB;
1858 _moveBXFunc = _moveBXCB;
1859 _moveBYFunc = _moveBYCB;
1860 _moveBZFunc = _moveBZCB;
1861 _moveBCFunc = _moveBCCB;
1862 _moveBTFunc = _moveBTCB;
1863 _moveBUFunc = _moveBUCB;
1866 switch (
vVol.getDim()) {
1868 _getVoxelFunc = _getVoxel1DCB;
1869 _setVoxelFunc = _setVoxel1DCB;
1870 _setCursorPosFunc = _setCursorPos1DCB;
1871 _moveCursorOffsetFunc = _moveCursorOffset1DCB;
1872 _isMappedFunc = _isMapped1DCB;
1875 _getVoxelFunc = _getVoxel2DCB;
1876 _setVoxelFunc = _setVoxel2DCB;
1877 _setCursorPosFunc = _setCursorPos2DCB;
1878 _moveCursorOffsetFunc = _moveCursorOffset2DCB;
1879 _isMappedFunc = _isMapped2DCB;
1882 _getVoxelFunc = _getVoxel3DCB;
1883 _setVoxelFunc = _setVoxel3DCB;
1884 _setCursorPosFunc = _setCursorPos3DCB;
1885 _moveCursorOffsetFunc = _moveCursorOffset3DCB;
1886 _isMappedFunc = _isMapped3DCB;
1889 _getVoxelFunc = _getVoxel4DCB;
1890 _setVoxelFunc = _setVoxel4DCB;
1891 _setCursorPosFunc = _setCursorPos4DCB;
1892 _moveCursorOffsetFunc = _moveCursorOffset4DCB;
1893 _isMappedFunc = _isMapped4DCB;
1896 _getVoxelFunc = _getVoxel5DCB;
1897 _setVoxelFunc = _setVoxel5DCB;
1898 _setCursorPosFunc = _setCursorPos5DCB;
1899 _moveCursorOffsetFunc = _moveCursorOffset5DCB;
1900 _isMappedFunc = _isMapped5DCB;
1903 _getVoxelFunc = _getVoxel6DCB;
1904 _setVoxelFunc = _setVoxel6DCB;
1905 _setCursorPosFunc = _setCursorPos6DCB;
1906 _moveCursorOffsetFunc = _moveCursorOffset6DCB;
1907 _isMappedFunc = _isMapped6DCB;
1910 _getVoxelFunc = _getVoxel6DCB;
1911 _setVoxelFunc = _setVoxel6DCB;
1912 _setCursorPosFunc = _setCursorPos6DCB;
1913 _moveCursorOffsetFunc = _moveCursorOffset6DCB;
1914 _isMappedFunc = _isMapped6DCBE;
1915 _virtVol->invalidate();
1929 _pageArray =
nullptr;
1933 _getVoxelFunc =
nullptr;
1934 _setVoxelFunc =
nullptr;
1935 _setCursorPosFunc =
nullptr;
1936 _moveCursorOffsetFunc =
nullptr;
1937 _isMappedFunc =
nullptr;
1938 _moveFXFunc =
nullptr;
1939 _moveFYFunc =
nullptr;
1940 _moveFZFunc =
nullptr;
1941 _moveFCFunc =
nullptr;
1942 _moveFTFunc =
nullptr;
1943 _moveFUFunc =
nullptr;
1944 _moveBXFunc =
nullptr;
1945 _moveBYFunc =
nullptr;
1946 _moveBZFunc =
nullptr;
1947 _moveBCFunc =
nullptr;
1948 _moveBTFunc =
nullptr;
1949 _moveBUFunc =
nullptr;
1965 PageBuffer*
const page = _pageArray + (pos.x >> _rShift.x);
1973 if ((
px < 0) || (
px >= _ext.x)) {
1976 PageBuffer*
const page = _pageArray + (
px >> _rShift.x);
1984 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y);
1993 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y)) {
1996 PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y);
2005 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z);
2006 return (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z];
2015 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z)) {
2019 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z);
2027 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2028 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c);
2030 page->
_getPageFkt(page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z + pos.c * _pStrides.c];
2040 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2045 PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y +
2046 (
pz >> _rShift.z) * _strides.z + (
pc >> _rShift.c) * _strides.c);
2054 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z +
2055 (pos.c >> _rShift.c) * _strides.c + (pos.t >> _rShift.t) * _strides.t);
2057 page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z + pos.c * _pStrides.c + pos.t * _pStrides.t];
2068 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2069 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t))
2074 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2075 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t);
2077 page->
_getPageFkt(page)))[
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t];
2083 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2084 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c +
2085 (pos.t >> _rShift.t) * _strides.t + (pos.u >> _rShift.u) * _strides.u);
2087 static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z +
2088 pos.c * _pStrides.c + pos.t * _pStrides.t + pos.u * _pStrides.u];
2100 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2101 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t) || (
pu < 0) || (
pu >= _ext.u))
2106 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2107 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t + (
pu >> _rShift.u) * _strides.u);
2109 page)))[
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t +
pu * _pStrides.u];
2121 PageBuffer*
const page = _pageArray + (pos.x >> _rShift.x);
2130 if ((
px < 0) || (
px >= _ext.x)) {
2133 PageBuffer*
const page = _pageArray + (
px >> _rShift.x);
2142 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y);
2152 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y)) {
2155 PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y);
2165 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z);
2176 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z)) {
2180 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z);
2189 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2190 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c);
2193 page->
_getPageFkt(page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z + pos.c * _pStrides.c] =
voxVal;
2203 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2208 PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y +
2209 (
pz >> _rShift.z) * _strides.z + (
pc >> _rShift.c) * _strides.c);
2220 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z +
2221 (pos.c >> _rShift.c) * _strides.c + (pos.t >> _rShift.t) * _strides.t);
2224 page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z + pos.c * _pStrides.c + pos.t * _pStrides.t] =
voxVal;
2235 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2236 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t))
2241 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2242 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t);
2245 page)))[
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t] =
voxVal;
2252 PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2253 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c +
2254 (pos.t >> _rShift.t) * _strides.t + (pos.u >> _rShift.u) * _strides.u);
2256 (
static_cast<DATATYPE*
>(page->
_getPageFkt(page)))[pos.x + pos.y * _pStrides.y + pos.z * _pStrides.z +
2257 pos.c * _pStrides.c + pos.t * _pStrides.t + pos.u * _pStrides.u] =
2270 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2271 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t) || (
pu < 0) || (
pu >= _ext.u))
2276 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2277 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t + (
pu >> _rShift.u) * _strides.u);
2280 page)))[
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t +
pu * _pStrides.u] =
2294 _cIdx =
static_cast<MLuint>(p.x);
2295 _cPageIdx =
static_cast<MLuint>(p.x >> _rShift.x);
2302 if ((
px < 0) || (
px >= _ext.x)) {
2307 _cPageIdx =
static_cast<MLuint>(
px >> _rShift.x);
2316 _cIdx =
static_cast<MLuint>(p.x + p.y * _pStrides.y);
2317 _cPageIdx =
static_cast<MLuint>((p.x >> _rShift.x) + (p.y >> _rShift.y) * _strides.y);
2325 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y)) {
2330 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y);
2331 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y);
2341 _cIdx =
static_cast<MLuint>(p.x + p.y * _pStrides.y + p.z * _pStrides.z);
2343 static_cast<MLuint>((p.x >> _rShift.x) + (p.y >> _rShift.y) * _strides.y + (p.z >> _rShift.z) * _strides.z);
2352 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z)) {
2358 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z);
2359 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z);
2370 _cIdx =
static_cast<MLuint>(p.x + p.y * _pStrides.y + p.z * _pStrides.z + p.c * _pStrides.c);
2371 _cPageIdx =
static_cast<MLuint>((p.x >> _rShift.x) + (p.y >> _rShift.y) * _strides.y +
2372 (p.z >> _rShift.z) * _strides.z + (p.c >> _rShift.c) * _strides.c);
2382 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2391 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c);
2392 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2393 (
pc >> _rShift.c) * _strides.c);
2404 _cIdx =
static_cast<MLuint>(p.x + p.y * _pStrides.y + p.z * _pStrides.z + p.c * _pStrides.c + p.t * _pStrides.t);
2408 static_cast<MLuint>((p.x >> _rShift.x) + (p.y >> _rShift.y) * _strides.y + (p.z >> _rShift.z) * _strides.z +
2409 (p.c >> _rShift.c) * _strides.c + (p.t >> _rShift.t) * _strides.t);
2420 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2421 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t))
2430 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t);
2433 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2434 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t);
2445 _cIdx =
static_cast<MLuint>(p.x + p.y * _pStrides.y + p.z * _pStrides.z + p.c * _pStrides.c + p.t * _pStrides.t +
2449 _cPageIdx =
static_cast<MLuint>((p.x >> _rShift.x) + (p.y >> _rShift.y) * _strides.y +
2450 (p.z >> _rShift.z) * _strides.z + (p.c >> _rShift.c) * _strides.c +
2451 (p.t >> _rShift.t) * _strides.t + (p.u >> _rShift.u) * _strides.u);
2463 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2464 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t) || (
pu < 0) || (
pu >= _ext.u))
2473 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t +
2477 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2478 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t +
2479 (
pu >> _rShift.u) * _strides.u);
2492 _cIdx =
static_cast<MLuint>(_cPos.x);
2493 _cPageIdx =
static_cast<MLuint>(_cPos.x >> _rShift.x);
2500 if ((
px < 0) || (
px >= _ext.x)) {
2505 _cPageIdx =
static_cast<MLuint>(
px >> _rShift.x);
2514 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y * _pStrides.y);
2515 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y) * _strides.y);
2523 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y)) {
2528 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y);
2529 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y);
2539 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y * _pStrides.y + _cPos.z * _pStrides.z);
2540 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y) * _strides.y +
2541 (_cPos.z >> _rShift.z) * _strides.z);
2550 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z)) {
2556 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z);
2557 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z);
2568 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y * _pStrides.y + _cPos.z * _pStrides.z + _cPos.c * _pStrides.c);
2569 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y) * _strides.y +
2570 (_cPos.z >> _rShift.z) * _strides.z + (_cPos.c >> _rShift.c) * _strides.c);
2580 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2589 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c);
2590 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2591 (
pc >> _rShift.c) * _strides.c);
2602 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y * _pStrides.y + _cPos.z * _pStrides.z + _cPos.c * _pStrides.c +
2603 _cPos.t * _pStrides.t);
2606 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y) * _strides.y +
2607 (_cPos.z >> _rShift.z) * _strides.z + (_cPos.c >> _rShift.c) * _strides.c +
2608 (_cPos.t >> _rShift.t) * _strides.t);
2619 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2620 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t))
2629 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t);
2632 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2633 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t);
2644 _cIdx =
static_cast<MLuint>(_cPos.x + _cPos.y * _pStrides.y + _cPos.z * _pStrides.z + _cPos.c * _pStrides.c +
2645 _cPos.t * _pStrides.t + _cPos.u * _pStrides.u);
2648 _cPageIdx =
static_cast<MLuint>((_cPos.x >> _rShift.x) + (_cPos.y >> _rShift.y) * _strides.y +
2649 (_cPos.z >> _rShift.z) * _strides.z + (_cPos.c >> _rShift.c) * _strides.c +
2650 (_cPos.t >> _rShift.t) * _strides.t + (_cPos.u >> _rShift.u) * _strides.u);
2662 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2663 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t) || (
pu < 0) || (
pu >= _ext.u))
2672 _cIdx =
static_cast<MLuint>(
px +
py * _pStrides.y +
pz * _pStrides.z +
pc * _pStrides.c +
pt * _pStrides.t +
2676 _cPageIdx =
static_cast<MLuint>((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2677 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t +
2678 (
pu >> _rShift.u) * _strides.u);
2690 const PageBuffer*
const page = _pageArray + (pos.x >> _rShift.x);
2691 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2699 if ((
px < 0) || (
px >= _ext.x)) {
2702 const PageBuffer*
const page = _pageArray + (
px >> _rShift.x);
2703 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2710 const PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y);
2711 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2720 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y)) {
2723 const PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y);
2724 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2732 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z);
2733 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2743 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z)) {
2747 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z);
2748 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2755 const PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2756 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c);
2757 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2768 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2773 const PageBuffer*
const page = _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y +
2774 (
pz >> _rShift.z) * _strides.z + (
pc >> _rShift.c) * _strides.c);
2775 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2783 _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y + (pos.z >> _rShift.z) * _strides.z +
2784 (pos.c >> _rShift.c) * _strides.c + (pos.t >> _rShift.t) * _strides.t);
2785 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2797 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2798 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t))
2803 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2804 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t);
2805 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2812 const PageBuffer*
const page = _pageArray + ((pos.x >> _rShift.x) + (pos.y >> _rShift.y) * _strides.y +
2813 (pos.z >> _rShift.z) * _strides.z + (pos.c >> _rShift.c) * _strides.c +
2814 (pos.t >> _rShift.t) * _strides.t + (pos.u >> _rShift.u) * _strides.u);
2815 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
2828 if ((
px < 0) || (
px >= _ext.x) || (
py < 0) || (
py >= _ext.y) || (
pz < 0) || (
pz >= _ext.z) || (
pc < 0) ||
2829 (
pc >= _ext.c) || (
pt < 0) || (
pt >= _ext.t) || (
pu < 0) || (
pu >= _ext.u))
2834 _pageArray + ((
px >> _rShift.x) + (
py >> _rShift.y) * _strides.y + (
pz >> _rShift.z) * _strides.z +
2835 (
pc >> _rShift.c) * _strides.c + (
pt >> _rShift.t) * _strides.t + (
pu >> _rShift.u) * _strides.u);
2836 return page->
_getPageFkt != VirtualVolume::_loadPageCB;
Class to manage a binary image.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
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 that is organized line...
const DATATYPE * getImagePointer(const ImageVector &position) const
Returns a pointer to voxel data of image voxel at 6D position position relative to the origin of the ...
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)
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)
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()
static void reverseMoveCursorCWrapped(void *vv)
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)
static DATATYPE _getVoxel3DCBE(TVirtualVolume *obj, const ImageVector &pos)
static void _moveBTCB(TVirtualVolume *obj)
static void _setVoxel3DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static bool _isMapped1DCB(const TVirtualVolume *obj, const ImageVector &pos)
DATATYPE ComponentType
A typedef to "export" the type of voxels components.
DATATYPE * getWrittenPageData(MLuint32 wp) const
Returns typed pointer to data of written page with page id wp.
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)
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)
static void moveCursorByOffsetWrapped(void *vv, const ImageVector &off)
static void _moveCursorOffset1DCB(TVirtualVolume *obj, const ImageVector &p)
static DATATYPE _getVoxel4DCBE(TVirtualVolume *obj, const ImageVector &pos)
static void _moveFYCB(TVirtualVolume *obj)
static void moveCursorUWrapped(void *vv)
static void moveCursorYWrapped(void *vv)
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)
static void _setVoxel6DCBE(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void _moveCursorOffset5DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _moveBXCBE(TVirtualVolume *obj)
static void _moveBCCBE(TVirtualVolume *obj)
static void _moveFXCBE(TVirtualVolume *obj)
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)
VirtualVolume & getVirtualVolume()
Returns the pointer to the wrapped untyped virtual volume.
static bool _isMapped3DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static void moveCursorXWrapped(void *vv)
static void _moveCursorOffset5DCB(TVirtualVolume *obj, const ImageVector &p)
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)
static void _moveBTCBE(TVirtualVolume *obj)
static bool _isMapped6DCBE(const TVirtualVolume *obj, const ImageVector &pos)
static void _setVoxel2DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void reverseMoveCursorTWrapped(void *vv)
static bool _isMapped2DCB(const TVirtualVolume *obj, const ImageVector &pos)
static void resetCursorWrapped(void *vv)
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)
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)
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)
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)
static void _moveBUCB(TVirtualVolume *obj)
static bool _isMapped4DCB(const TVirtualVolume *obj, const ImageVector &pos)
const ImageVector & getCursorPosition() const
Return the current cursor coordinates.
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)
static void _moveCursorOffset1DCBE(TVirtualVolume *obj, const ImageVector &p)
static void _moveBCCB(TVirtualVolume *obj)
static void _setVoxel5DCB(TVirtualVolume *obj, const ImageVector &pos, DATATYPE voxVal)
static void _moveCursorOffset2DCB(TVirtualVolume *obj, const ImageVector &p)
static MLldouble getLDoubleValueWrapped(void *vv, const ImageVector &pos)
static void _moveCursorOffset6DCB(TVirtualVolume *obj, const ImageVector &p)
static void _moveFCCBE(TVirtualVolume *obj)
static void _moveFTCBE(TVirtualVolume *obj)
static void _moveBZCB(TVirtualVolume *obj)
static bool _isMapped3DCB(const TVirtualVolume *obj, const ImageVector &pos)
void reverseMoveCursorX()
static void reverseMoveCursorXWrapped(void *vv)
TVirtualVolume & operator=(const TVirtualVolume &)
Hide the default assignment operator to avoid incorrect usage due to missing initializations.
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)
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)
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)
static DATATYPE _getVoxel5DCB(TVirtualVolume *obj, const ImageVector &pos)
static void _setCursorPos5DCB(TVirtualVolume *obj, const ImageVector &p)
void reverseMoveCursorC()
static void setLDoubleValueWrapped(void *vv, const ImageVector &pos, MLldouble v)
This class manages a virtual volume organizing efficient voxel access to the output image of an input...
#define ML_BAD_DATA_TYPE
A wrong or unexpected data type has been passed to an algorithm, which often is a programming error.
#define ML_BAD_DIMENSION
The 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 that is outside of an image or it is e...
#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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#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 ...
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.