UCL / pet-rd-tools

Command line tools for PET-MR (pre-)processing
Apache License 2.0
13 stars 4 forks source link

Interfile name of data file is relative to CWD, not header #9

Closed ashgillman closed 6 years ago

ashgillman commented 6 years ago

This creates issues if the output file is not in the CWD

bathomas commented 6 years ago

The problem with putting the full path in the Interfile header is that the header/image pair is then no longer portable. I'm of the opinion that a relative path should be in the header unless someone wishes to expressly use an absolute path. I'm open to suggestions though...

KrisThielemans commented 6 years ago

indeed. has to be relative path. As normally the header and the binary are in the same directory, it effectively means there should be no path.

STIR will read that ok.

ashgillman commented 6 years ago

Yes, sorry relative path is indeed preferred.

The issue is if you are, for example in $HOME, and you set the output to be experiments/umap.hv, then currently the name of data file will be set to experiments/umap.dat (or similar, sorry I can't remember the extension). However, it is desired to just be umap.dat.

So the problem is the relative path to the data file is relative to $CWD, not relative to the header file.

ashgillman commented 6 years ago

Sorry, I should have provided a proper explanation!