/home/brain/Downloads/Slicer-5.2.2-linux-amd64/NA-MIC/Extensions-31382/SlicerDMRI/lib/Slicer-5.2/cli-modules/FiberTractMeasurements: error while loading shared libraries: libSlicerBaseLogic.so: cannot open shared object file: No such file or directory
<wm_diffusion_measurements> Measurements done at: ./DiffusionMeasurements/commissural_clusters.csv
This is happened to both tutorial data and my own DTI data, and either input is SeparatedClusters or AnatomicalTracts. I think the folder structure for SlicerDMRI in my PC is correct.
Anyone who has advice on this issue?
Hi,
experiencing the very same error using Slicer 5.2.2 on Ubuntu 22.04 and when calling the measurement module through the wm_apply_ORG_atlas_to_subject.sh WMA script:
Instead, if I try to call the Python module directly from the command line, Slicer is unable to load the tractography data:
wm_diffusion_measurements.py /path/to/AnatomicalTracts /path/to/clusters.csv /opt/Slicer-5.2.2-linux-amd64/Slicer
Importing whitematteranalysis package.
<wm_diffusion_measurements>. Starting scalar measurement extraction.
=====input directory======
/path/to/AnatomicalTracts
=====output directory=====
/path/to/
=====3D Slicer====
/opt/Slicer-5.2.2-linux-amd64/Slicer
==========================
Switch to module: "Welcome"
Ignore argument received via command-line (not a valid URL or existing local file): "--inputtype"
Ignore argument received via command-line (not a valid URL or existing local file): "Fibers_File_Folder"
Ignore argument received via command-line (not a valid URL or existing local file): "--format"
Ignore argument received via command-line (not a valid URL or existing local file): "Column_Hierarchy"
Ignore argument received via command-line (not a valid URL or existing local file): "--separator"
Ignore argument received via command-line (not a valid URL or existing local file): "Comma"
Ignore argument received via command-line (not a valid URL or existing local file): "--inputdirectory"
Local filepath received via command-line: " /path/to/AnatomicalTracts"
Ignore argument received via command-line (not a valid URL or existing local file): "--outputfile"
Ignore argument received via command-line (not a valid URL or existing local file): " /path/to/clusters.csv"
static void qSlicerIOManager::showLoadNodesResultDialog(bool, vtkMRMLMessageCollection*) Errors occurred while loading nodes: "Error: Loading /path/to//AnatomicalTracts - load failed.\n"
Switch to module: ""
Switch to module: ""
<wm_diffusion_measurements> Measurements done at: /path/to/clusters.csv
Any suggestion to make this work one way or the other?
Hi, this issue is very similar to my problem. I tried many things on this topic, using some version of slicer, even on Mac and Windows. I noticed even I tried TractographyMeasurement on GUI, I couldn’t get any CSV file in folder like you mentioned in another topic.
Bacause I was running of time, I gave up using Slicer for my tract study.
Hope you can solve this issue!
On MacOS (mine is Ventura 13.2.1), it is working properly for me as it is. Please see the below screenshot for my setting to run the wm_diffusion_measurements script using Slicer 5.2.2 stable release:
On Ubuntu (mine is 20.04.4 LTS), I also saw the issue about missing lib files when using Slicer 5.2.2 when directly call the FiberTractMeasurements module in the CLI mode. In this case, we would need to use Slicer Launcher to call the module so the program can set all the required libs. Please see the following screenshot for how this is being set. Please be noted of the red underline part. One change to what we did before is that the full path of the FiberTractMeasurements module is needed rather than the name of the module.
OK, I figured out how to obtain the bundle stats using the GUI when specifying a folder (using the Fibers_File_Folder mode):
The stats are computed and written to the specified CSV file.
I could not make it work when trying to compute the stats using the Fiber_Hierarchy mode: a 0-sized file is written: @lassoan@pieper@zhangfanmark Am I correct when assuming that if I load a number of bundles (or an MRML created out of them) the Fibers_Hierarchy mode should work as fine as when using the Fibers_File_Folder option? Is there something else we should do to actually “create a hierachy”? TheFibers Hierarchy mode has the options Rename current ModelHierarchy and Delete current ModelHierarchy but when clicking no actions seems to be taken.
I’m not sure - maybe @zhangfanmark or @ljod knows if the Fibers_Hierarchy option is still valid. My guess is that the feature was added in an older Slicer version (there used to be a Model Hierarchy concept that has been replaced by the more general Subject Hierarchy in current Slicer versions). Unless there’s a strong need and some resources to investigate updating this feature, the easiest option would be to just remove the XML and C++ code.
As a side note, this module is an example of an older style of Slicer module that tried to abstract the GUI in XML and it made certain features like this one kind of clunky. In modern Slicer we’d try to create a more convenient interface using python scripting and then call the C++ code with all the arguments managed by the python code.
As Steve said the Fibers_Hierarchy is an old style of Slicer module. It is helpful when we created the atlas where multiple clusters form a tract. In this case, we can compute measure from not only tracts but also individual clusters. Currently, our use case is mostly Fibers_File_Folder, so you don’t need to worry about this. We want to keep this option so we can track back what we did before. To use this function, yes, you need to create a hierarchy or use an existing defined in a mrml file.
Not sure I understand the difference: whenever I load a number of tractograms in a SW, I would tend to think that I can compute features out of these. If within the Slicer realm a hierarchy must be created in order to do this, does it make sense to create a default one (e.g. including all loaded data)? I understand that computing measurements for individual clusters or at different levels is relevant, but IMHO the same principle applies if I consider that my clusters are those files that I loaded into Slicer. I am happy to help fixing this.
Yesterday I tried loading a number of tractography data into Slicer, created what seemed to be a hierarchy by creating a subject, then saved the scene as an MRML and the CSV written had still no contents. So there is something else that must be done.
I don’t believe there is a way to create the deprecated Model Hierarchy via the GUI anymore.
There’s some discussion here:
I don’t recall that anyone worked on adding Subject Hierarchy support to the CLIs, probably because, as I mentioned, writing the CLI GUI in XML always resulted in clunky interfaces for anything other than the simplest workflows. I don’t think it would be hard to write a better GUI for the tractography measurements module (at least that’s what I’d do if I wanted to work on this).
@jhlegarreta note that with the Data Module you can right-click on a folder and choose Export to file and save all contents to a temp folder and then run the tractography analysis on them.
Not sure I understand: if trying to launch the analysis on the loaded tractography data does not work, users should be warned about it or the feature should direct/force users to choose a directory. I still think that, as it is the case with other features, one would expect any processing/analysis to be applied to the data loaded into Slicer without needing to first export it to a folder.