git clone --recurse-submodules https://github.com/fangq/iso2mesh.git cd iso2mesh rm -rf bin/*.mex* bin/*.exe cd tools make clean make
since the current CGAL is 4.14 on fc30 I think I am getting the following error:
[mhough@fedora-flip tools]$ make
if test -f cgalmesh/CMakeLists.txt; then cd cgalmesh && cmake . && cd ..; fi
-- __cplusplus is 201402
-- --> Do not link with Boost.Thread
-- Boost version: 1.69.0
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Build type: Release
-- USING CXXFLAGS = ' -O2 -DNDEBUG'
-- USING EXEFLAGS = ' '
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Requested component: ImageIO
-- Requested component: MPFR
-- Requested component: GMP
-- Boost version: 1.69.0
-- Found Intel TBB
CMake Deprecation Warning at /usr/lib64/cmake/CGAL/UseTBB.cmake:8 (message):
This file UseTBB.cmake is deprecated, and the function
`CGAL_target_use_TBB` from CGAL_target_use_TBB.cmake should be used
instead.
Call Stack (most recent call first):
CMakeLists.txt:50 (include)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mhough/Documents/MATLAB/iso2mesh/tools/cgalmesh
make -C cgalmesh --no-print-directory
[ 25%] Building CXX object CMakeFiles/mesh_polyhedral_domain.dir/mesh_polyhedral_domain.cpp.o
/home/mhough/Documents/MATLAB/iso2mesh/tools/cgalmesh/mesh_polyhedral_domain.cpp:1:10: fatal error: CGAL/AABB_intersections.h: No such file or directory
1 | #include <CGAL/AABB_intersections.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [CMakeFiles/mesh_polyhedral_domain.dir/build.make:63: CMakeFiles/mesh_polyhedral_domain.dir/mesh_polyhedral_domain.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/mesh_polyhedral_domain.dir/all] Error 2
make[1]: *** [Makefile:84: all] Error 2
make: *** [commons/Makefile_common.mk:68: cgalmesh] Error 2
Hi Qianqian,
Now I see that the fix is rather trivial.
If I modify iso2mesh/tools/cgalmesh/mesh_polyhedral_domain.cpp
from CGAL/AABB_intersections.h to CGAL/intersections.h
hi Morgan
thanks for the update. On my Ubuntu 16.04 box,
AABB_intersections.h exists in CGAL 4.7, but I assume at some
point it was renamed. Need to add a macro to make it compatible to
newer CGAL versions, but I had a hard time tracking when this
rename was made. will update if I find out.
I can build everything until meshfix now with the following error:
home/mhough/Documents/MATLAB/iso2mesh/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:3439:10: fatal error: slu_cdefs.h: No such file or directory
3439 | #include <slu_cdefs.h>
| ^~~~~~~~~~~~~
compilation terminated.
the slu_cdefs.h is part of SuperLU. For some reason, I found that
the folder in my system under iso2mesh/tools/meshfix/ has a
similar structure compared to this
https://github.com/alecjacobson/meshfix/tree/master/JMeshExt-1.0alpha_src
which contains SuperLU (https://github.com/alecjacobson/meshfix/tree/master/JMeshExt-1.0alpha_src/OpenNL3.2.1)
instead of resembling my meshfix fork
https://github.com/fangq/meshfix
I don't fully remember whether I explicitly changed the meshfix
submodule to other sources, or SuperLU was supposed to be added as
a submodule under meshfix/JMeshxxx/OpenNLxxx/
do you want to try adding the SuperLU submodule first? if it does
not work, perhaps checkout the https://github.com/alecjacobson/meshfix/
to replace my meshfix fork?
I haven't had a chance to run a pipeline with these built mex tools or search for issues with slu_cdefs.h but I thought I would update my previous post with this info for now.
just one clarification - the tools compiled by the source files in this folder are not mex files, they are simply binary executables and renamed in mex suffix to allow them co-exist on multiple platforms.
Qianqian
--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/6ac6f8fd-b159-4037-92d6-d292bb437cb1%40googlegroups.com.
I can build everything until meshfix now with the following error:
home/mhough/Documents/MATLAB/iso2mesh/tools/meshfix/contrib/OpenNL3.2.1/src/nl_single_file.c:3439:10: fatal error: slu_cdefs.h: No such file or directory
3439 | #include <slu_cdefs.h>
| ^~~~~~~~~~~~~
compilation terminated.
the slu_cdefs.h is part of SuperLU. For some reason, I found that the folder in my system under iso2mesh/tools/meshfix/ has a similar structure compared to this
hi Morgan,
I know what to do. you need to add SuperLU-devel to
BuildRequires; in Debian/Ubuntu, the missing header file is
provided by libsuperlu-dev
by the way, it has been a while since we met last year, hope
everything is going well!
Qianqian
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mes...@googlegroups.com.
Hey Qianqian,
Thanks. Really helpful. There are so many meshfix projects aren't there:)
Using the system SuperLU, I think I need to append SuperLU in the include path to slu_cdefs.h in nl_single_file.c but now I am getting some error about lblas now. It's late here in London so I will follow up on this later
yes, I think if you follow the trail, it will need a few additional dependencies. I think the packages will be different on Debian/Ubuntu.
What I want is to do is run brain2mesh on Fedora/Octave. I know need to download loadnii.m. Is that not freely distributable? Does the octave-image package provide imfill and imdilate?
I see.
load_nii.m itself is open-source and part of a BSD licensed toolbox
https://www.mathworks.com/matlabcentral/fileexchange/8797-tools-for-nifti-and-analyze-image
but the support for .nii.gz depends on MATLAB's jvm, which I suppose is not available on Octave.
a workaround is to call unzip.m to call unzip the .nii.gz to a temp file, and then load with load_nii (alternatively, you can use my ZMat toolbox to decompress the file stream in memory).
I added my own nii parser to iso2mesh this summer (as part of the JNIfTI specification I worked on)
https://github.com/fangq/iso2mesh/blob/master/nii2jnii.m
copied from
https://github.com/fangq/jnifti/blob/master/lib/matlab/nii2jnii.m
but it needs
memmapfile which is not yet supported in octave, only a draft version available
https://savannah.gnu.org/bugs/?54788
it appears that imfill/imdilate are already supported in octave-image, but I admit I've never tested brain2mesh on Octave. I will try it out tomorrow and let you know if I need to change anything to make it compatible.
Yes, love to catch up sometime. Congrats on the R01! Bummed I missed the MCX '19 workshop. Will MCX '20 be at biophotonics next year?
for MCX'20, I haven't decided yet. At minimum, we will run a short version (~3 hr) at fNIRS2020 in Boston next year. If you come to Boston again, let me know.
Qianqian
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/f495ef31-a79e-4176-ae50-382d98a604c1%40googlegroups.com.
Hey Qianqian,
Thanks. Really helpful. There are so many meshfix projects aren't there:)
Using the system SuperLU, I think I need to append SuperLU in the include path to slu_cdefs.h in nl_single_file.c but now I am getting some error about lblas now. It's late here in London so I will follow up on this later
What I want is to do is run brain2mesh on Fedora/Octave. I know need to download loadnii.m. Is that not freely distributable? Does the octave-image package provide imfill and imdilate?
hi Morgan
just want to let you know that I was able to run brain2mesh on Octave 4.2.2. A few changes are needed.
The first thing I did was to convert .nii.gz files into the JNIfTI format (https://github.com/fangq/jnifti) that I recently developed. here is the commit
https://github.com/fangq/brain2mesh/commit/eb9ebb722dd77138050ac291e4c6390994e18d89
The github version of iso2mesh already supports reading/writing text and binary based JNIFTI files (loadjnifti.m and savejnifti.m), so you no longer need to install load_nii.m. However, to reduce file sizes, I applied compression to the .jnii files (they are basically plain JSON files!), to decompress these files on Octave, you do need to install my other toolbox, zmat (http://github.com/fangq/zmat) to octave (fully compatible).
With the addition of zmat and the .jnii files, you should be able to load the SPM segmentations.
I tested brain2mesh demo script in Octave 4.2.2 on my Ubuntu 16.04 box, and was able to eventually run it. see my attached screenshot.
Initially octave throwed the below error from imfill.m (the apt installed version was
octave-image 2.6.1)
error: 'conndef' undefined near line 72 column 10
error: called from
imfill at line 72 column 8
brain2mesh at line 123 column 9
SPM_example_brain at line 25 column 17
however, as mentioned in this thread
https://sourceforge.net/p/octave/package-releases/358/?limit=25
the conndef.oct file was actually compiled, but somehow imfill can not locate it. So, I just added its path by
>> addpath('/usr/lib/x86_64-linux-gnu/octave/packages/image-2.6.1/x86_64-pc-linux-gnu-api-v51/')
then, the SPM_example_brain.m script completes successfully.
The other demo script gave an error, but it does the same in MATLAB, so it is not related to octave. I will take a look and see if I can fix that.
Anyways, just to show you that this is actually doable.
Qianqian
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/f495ef31-a79e-4176-ae50-382d98a604c1%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/987c1632-6bc1-1805-9c63-eae624d97187%40neu.edu.