rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
197 stars 31 forks source link

Location of installed files #14

Closed TheChymera closed 4 years ago

TheChymera commented 4 years ago

Having compiled and installed the following files:

silenthost ~ # equery f mricrogl
 * Searching for mricrogl ...
 * Contents of sci-visualization/mricrogl-1.2.20200324:
/usr
/usr/bin
/usr/bin/MRIcroGL
/usr/share
/usr/share/MRIcroGL
/usr/share/MRIcroGL/lut
/usr/share/MRIcroGL/lut/1red.clut
/usr/share/MRIcroGL/lut/2green.clut
/usr/share/MRIcroGL/lut/3blue.clut
/usr/share/MRIcroGL/lut/4hot.clut
/usr/share/MRIcroGL/lut/5winter.clut
/usr/share/MRIcroGL/lut/6bluegrn.clut
/usr/share/MRIcroGL/lut/6warm.clut
/usr/share/MRIcroGL/lut/7cool.clut
/usr/share/MRIcroGL/lut/8redyell.clut
/usr/share/MRIcroGL/lut/CT_Bones.clut
/usr/share/MRIcroGL/lut/CT_Kidneys.clut
/usr/share/MRIcroGL/lut/CT_Liver.clut
/usr/share/MRIcroGL/lut/CT_Muscles.clut
/usr/share/MRIcroGL/lut/CT_Skull.clut
/usr/share/MRIcroGL/lut/CT_Soft_Tissue.clut
/usr/share/MRIcroGL/lut/CT_Surface.clut
/usr/share/MRIcroGL/lut/CT_Vessels.clut
/usr/share/MRIcroGL/lut/CT_w_Contrast.clut
/usr/share/MRIcroGL/lut/GE_color.clut
/usr/share/MRIcroGL/lut/HOTIRON.clut
/usr/share/MRIcroGL/lut/Inferno.clut
/usr/share/MRIcroGL/lut/NIH.clut
/usr/share/MRIcroGL/lut/Plasma.clut
/usr/share/MRIcroGL/lut/Viridis.clut
/usr/share/MRIcroGL/lut/actc.clut
/usr/share/MRIcroGL/lut/blue2red.clut
/usr/share/MRIcroGL/lut/bone.clut
/usr/share/MRIcroGL/lut/bronze.clut
/usr/share/MRIcroGL/lut/copper.clut
/usr/share/MRIcroGL/lut/copper2.clut
/usr/share/MRIcroGL/lut/cubehelix.clut
/usr/share/MRIcroGL/lut/electric_blue.clut
/usr/share/MRIcroGL/lut/gold.clut
/usr/share/MRIcroGL/lut/jet.clut
/usr/share/MRIcroGL/lut/linspecer.clut
/usr/share/MRIcroGL/lut/surface.clut
/usr/share/MRIcroGL/lut/x_rain.clut
/usr/share/MRIcroGL/script
/usr/share/MRIcroGL/script/basic.py
/usr/share/MRIcroGL/script/clip.py
/usr/share/MRIcroGL/script/cluster.py
/usr/share/MRIcroGL/script/ct_abdomen.py
/usr/share/MRIcroGL/script/ct_head.py
/usr/share/MRIcroGL/script/cutout.py
/usr/share/MRIcroGL/script/explode.py
/usr/share/MRIcroGL/script/explode2.py
/usr/share/MRIcroGL/script/glass.py
/usr/share/MRIcroGL/script/help.py
/usr/share/MRIcroGL/script/hidezeros.py
/usr/share/MRIcroGL/script/invert.py
/usr/share/MRIcroGL/script/jagged.py
/usr/share/MRIcroGL/script/mip.py
/usr/share/MRIcroGL/script/mosaic.py
/usr/share/MRIcroGL/script/mosaic2.py
/usr/share/MRIcroGL/shader
/usr/share/MRIcroGL/shader/Default.glsl
/usr/share/MRIcroGL/shader/Edges.glsl
/usr/share/MRIcroGL/shader/Glass.glsl
/usr/share/MRIcroGL/shader/MIP.glsl
/usr/share/MRIcroGL/shader/Matte.glsl
/usr/share/MRIcroGL/shader/Minimal.glsl
/usr/share/MRIcroGL/shader/Occlusion.glsl
/usr/share/MRIcroGL/shader/OverlaySurface.glsl
/usr/share/MRIcroGL/shader/Shell.glsl
/usr/share/MRIcroGL/shader/ShellEdges.glsl
/usr/share/MRIcroGL/shader/Slow 2.glsl
/usr/share/MRIcroGL/shader/Slow.glsl
/usr/share/MRIcroGL/shader/SpecialEffects.glsl
/usr/share/MRIcroGL/shader/Standard.glsl
/usr/share/MRIcroGL/shader/Tomography.glsl

I get lots of issues from MRIcroGL, and while the interface starts, it's not able to do much (I can try to do a video recording if the exact behaviour is of interest to you).

I am assuming perhaps MRIcriGL does not find the files under /usr/share/MRIcroGL (which would be the correct place to install them according to the FHS). Is this the case? And if so, how can I tell it to look in the right place?

TheChymera commented 4 years ago

@neurolabusc here's a video of what's going on: http://chymera.eu/debug/mricrogl/resources.mp4

neurolabusc commented 4 years ago

The README.md notes that /usr/local/share/MRIcroGL/Resources is one of the searched locations. I will add /usr/share/MRIcroGL, but can you test out the methods noted in the documentation (e.g. either /usr/local/share/MRIcroGL/Resources or setting the environment variable MRICROGL_DIR=/usr/share/MRIcroGL).

neurolabusc commented 4 years ago

I have updated the README.md section Deploying MRIcroGL to describe the more exhaustive search for the Resource directory. The changes to source code are made to the shared Metal-Demos files, so make sure you update your Metal demos when you recompile.

TheChymera commented 4 years ago

@neurolabusc are you sure you added /usr/share/MRIcroGL to the directories? both in the respective commit, and having built MRIcroGL with the latest Metal-Demos, I only see it looking under /usr/local/share/MRIcroGL.

/usr/local is pretty nonstandard and not really used by any other packages:

chymera@silenthost ~ $ tree /usr/local/
/usr/local/
├── bin
├── lib
├── lib64
└── sbin

4 directories, 0 files

Nothing against checking it, but I think /usr/share is a much more important location to add.

neurolabusc commented 4 years ago

Added /usr/share to search path. Where does your Linux distribution install FSL?

TheChymera commented 4 years ago

This is our file list for fsl: fsl_flielist.txt

neurolabusc commented 4 years ago

Wow, so your $FSLDIR is /usr/bin, not /usr/local/fsl. Tell me if the latest modifications resolve your issues.

TheChymera commented 4 years ago

@neurolabusc yes, we install FSL so that it more-or-less respects the FHS. Ofc it would have been better if upstream fixed the issue themselves, but being such a large project the fix is not as easy as here and the project moves more slowly. The core issue which the FSL developers were trying to mitigate by having their own directories, is that they have very many executables whose names would potentially conflict with other packages (it doesn't even really solve that issue very well, since even if they do not conflict on disk, the names may still conflict in the $PATH). The best solution for that would be sub-commands as for git, but again, this requires significant upstream commitment. For the time being, however, our set-up allowed us to check if there are indeed any conflicts to motivate this, and surprisingly, for FSL, the answer thus far is no. We had an issue with AFNI once but the developers were kind enough to fix this, and wise enough to just rename the binary and not try to create their own directory. Sub-commands would have been better still, but this is sadly and very understandably not immediately feasible.

More to the point, though, MRIcroGL works now, thank you so much!