Closed fangq closed 2 years ago
Curious.
OLD=1 make -j
which will use the classic marching cubes instead of Lewiner's tables? g++ -O1 -g -fsanitize=address -fno-omit-frame-pointer ....
- Did you try compiling with OLD=1 make -j which will use the classic marching cubes instead of Lewiner's tables?
using OLD=1
, this error does not appear, so, it is related to the Lewiner's marching cube code
- If you use Clang, I find the sanitize mode is a great way to isolate problems. You can try this
I am getting a few errors when compiling with g++/clang++, I admit that I have been mostly using gcc.
- Feel free to share the problematic file with me.
the file, digimouse.nii
, can be found from checking out the main repo at https://github.com/NeuroJSON/nii2mesh, and the file is located under data/
. You will need to build nii2mesh using JSON=1
to read the .jnii file. If you do not build JSON=1, you can test this .nii.gz file.
while I was testing the below command as part of PR #1
I got a segfault in several computers I tested. However, running
valgrind
with the above command completed without a problem. I traced the crash to themarchingCubes
function.The volume digimouse.jnii contains segmentation labels from 0 to 21. Setting
-i 0.5
, I meant to extract the exterior surface. in such case, thehi
bbx corner matches the maximum z-axis (104)if I remove -i 0.5, and let nii2mesh to choose the default isolevel, the program runs without an error, it prints the below parameters, note that the bbx bounded by lo/hi are no longer align with the outer boundary
so I suspected that the
marchingCubes
function has some robustness issues when processing surfaces along the exterior bbx of the volume.do you know what is the expected behavior for the marching-cubes module in such case? as I mentioned, when running valgrind, it did output a valid mesh, see below