FiberTractMeasurements not writing to output file

Operating system:
NAME=“Ubuntu”
VERSION=“16.04.3 LTS (Xenial Xerus)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 16.04.3 LTS”
VERSION_ID=“16.04”

Slicer version:
slicer nightly version (updated as of 2018-08-20)

Hi,

I’m running the following code - it runs through without error but it doesn’t write the output in the output file.

FiberTractMeasurements --outputfile $outputfolder/FiberMeasurements/$filename/$hemisphere --inputdirectory $outputfolder/AppendClusters/'OutliersPerSubject_'$filename/$hemisphere -i Fibers_File_Folder --separator Tab -f Column_Hierarchy

I just realized that the script doesn’t work properly when the parent directory does not exist. I just created the parent directory and the code is running successfully. I think the code should be modified to either give an error message or create the directory if it does not exist.

Fixed here. From the next nightly version, it should raise an error.

I don’t think there is a good way to check/create intermediate paths before opening a file in the current C++ version we are using (without adding a new library dependency edit: actually I guess we could use vtksys, but the second point still applies), and in any case, doing so without warning might be unwelcome in some circumstances.

Thanks for the report.