dcmqi
dcmqi copied to clipboard
Default parameters for itkimage2segimage
In order to be able to use as few parameters as possible, we need to define some defaults for the following parameters:
- skipEmptySlices
- compress
- cropSegmentsBBox (which is WIP)
Good point. The question is, should parameters like this be communicated in the JSON, the same way DICOM metadata is communicated, or separately?
I think only the parameters regarding series and segments should be communicated with JSON.
If those parameters are meant to be changed rarely, then I would add a config file for that or another idea is to make the library OO and add some default parameters when instantiating the (Converter)-class.
What do you think?
I am actually thinking why not keep this in JSON? It is confusing to break parameters into different groups. And JSON will allow us to consistently document and define defaults.
cc: @pieper - what would be your suggestion here?
yeah you might be right, but when converting from DICOM to itk including creating a JSON file, where do we get the default parameter from then? Or am I wrong?
when converting from DICOM to itk including creating a JSON file, where do we get the default parameter from then? Or am I wrong?
No, you are not wrong. It is just that some parameters might only make sense doing conversion in one direction.
This may be a case where you want to use the 'private tag' concept inside the json file to differentiate between parameters that become part of the output object vs parameters that describe how the operation should be performed. The parameters like skipEmptySlices could be included in the output object as a kind of provenance even if they aren't part of the technically required fields of a segmentation object.
We have defaults for those parameters set in the CLI XML, and this has been working quite well.