ITKElastix
ITKElastix copied to clipboard
Feature: Write log to file without writing transform parameters
Currently, in order to write the log to file you need to do the following:
elastix_object = itk.ElastixRegistrationMethod[itk.Image[itk.F, 3], itk.Image[itk.F, 3]].New()
elastix_object.SetLogToFile(True)
elastix_object.SetLogFileName("out.log")
elastix_object.SetOutputDirectory("/data/")
However, by using elastix_object.SetOutputDirectory
, the transform parameter file will also automatically be written to the specified output directory. I am already saving the transform parameter file separately (after manipulating it a bit ), so having it written to file without explicitly asking Elastix is confusing and clutters up folders.
Ideally, something like this would be sufficient, as it would be clear then that only the log file is written:
elastix_object = itk.ElastixRegistrationMethod[itk.Image[itk.F, 3], itk.Image[itk.F, 3]].New()
elastix_object.SetLogToFile(True)
elastix_object.SetLogFileName("/data/out.log")
However, explicitly setting that the transform parameter file should not be written is also a solution:
elastix_object = itk.ElastixRegistrationMethod[itk.Image[itk.F, 3], itk.Image[itk.F, 3]].New()
elastix_object.SetLogToFile(True)
elastix_object.SetLogFileName("out.log")
elastix_object.SetOutputDirectory("/data/")
elastix_object.SetWriteTransformParameters(False)
CC @N-Dekker
@N-Dekker has our logging options improved with 0.16.0, or will the spdlog related support be finalized in a future release?
@thewtex Sorry, ITKElastix 0.16.0 based on elastix library release 5.1.0 does not yet have extra logging options. To be added in a future release!