-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: specify output name for file in transformix/elastix #672
Comments
Interesting suggestion, thanks! Note that in Python you can already achieve this, when using ITKElastix https://github.com/InsightSoftwareConsortium/ITKElastix |
As far as I can see, the default is "output-directory/result.mhd", looking at: elastix/Core/Kernel/elxElastixTemplate.hxx Lines 385 to 389 in 0a1e90f
I guess the proposal is to allow specifying a path relative to the output directory, right? Or would it be relative to the current working directory? Of course, it should then also allow specifying an absolute path, either starting with a (back) slash, or a drive letter, followed by colon and (back) slash. Right? But then, would it entirely ignore the "ResultImageFormat" parameter from the parameter file? If the directory of the specified file path would be non-existing, would it be OK for transformix to just fail? Or should it try to create the directory? |
In my opinion it can be much simpler than this. Although specifying additional paths would be nice, in principle I think it's fine to store everything just in the output directory. That way instead of always saving a file as result. it can be something like . This allows for a bit more flexibility and clarity when saving transformed images. |
Addressing issue #672 "Feature request: specify output name for file in transformix/elastix" by Sebastian van der Voort.
… elastix.exe Addressing issue #672 "Feature request: specify output name for file in transformix/elastix" by Sebastian van der Voort.
Allows the user to specify the name of the result file, that would otherwise just be named something like "result.mhd". This improvement applies mainly to the elastix and transformix *executables*. Moreover, for the elastix library, it also applies to the result image files generated with "WriteResultImageAfterEachResolution" and "WriteResultImageAfterEachIteration". Addressing issue #672 "Feature request: specify output name for file in transformix/elastix" by Sebastian van der Voort.
Allows the user to specify the name of the result file, that would otherwise just be named something like "result.mhd". This improvement applies mainly to the elastix and transformix *executables*. But moreover, for the elastix library, it also applies to the result image files generated with "WriteResultImageAfterEachResolution" and "WriteResultImageAfterEachIteration". Addressing issue #672 "Feature request: specify output name for file in transformix/elastix" by Sebastian van der Voort.
Allows the user to specify the name of the result file, that would otherwise just be named something like "result.mhd". This improvement applies mainly to the elastix and transformix *executables*. But moreover, for the elastix library, it also applies to the result image files generated with "WriteResultImageAfterEachResolution" and "WriteResultImageAfterEachIteration". Addressing issue #672 "Feature request: specify output name for file in transformix/elastix" by Sebastian van der Voort.
Currently, when running elastix/transformix it is only possible to specify the output directory, and not specifically the output name.
For example, from elastix the output files will always be named
TransformParameters.0.txt
and from transformixresult.nii.gz
.Especially for transformix it would be nice to be able to specify the output file name.
I often have the situation where I need to apply the same transformation to multiple images (for example different MR modalities). In this case, I either have to create a new directory per image just to save the transformed image or have to write a wrapper around transformix to rename the output file before a new run.
Could a flag be added to elastix/transformix to specify the output filename directly?
For example:
transformix -tp TransformParameters.0.txt -out /home/user/ -filename T1 original_scan.nii.gz
If the
filename
flag is not provided, elastix/transformix can use the current default behavior (in this case, writing the file asresult.nii.gz
), not breaking any existing functionality.The text was updated successfully, but these errors were encountered: