Slicer spr export

I think I found a tiny bug in the Slicer image export.

I am using Slicer 4.10.2 on a MacOS computer. I can open a NRRD volume and choose File/Save to save the file. I want to save as Stimulate Sdt so I save Stimulate (.spr) from the pulldown. I accept that I want to save the file as “spr.spr” in the folder /Users/chris/s. It then generates a header (.spr) and image (.sdt) file. If I open the header with a text file I see:

stimFileName: /Users/chris/s/TempWritenrrd/spr.sdt

The folder TempWritenrrd does not exist, and both .sdt and .spr files are saved in /Users/chris/s. I think the Slicer writer should only use the file name without path or to include the actual path.

Yes, this is indeed incorrect behavior. It is a bug in ITK (itkStimulateImageIO.cxx) that file path is not removed. I’ve also noticed that saving and reloading a file results in a 90+90 deg rotation of the volume. Is this file format still used somewhere? (the document that you linked is written in 1996!) If not that much, then maybe it is better to remove it from ITK and Slicer.

I only added support to MRIcroGL for Slicer compatibility. Seems safe to retire this format.

2 Likes