dcmqi icon indicating copy to clipboard operation
dcmqi copied to clipboard

Default parameters for itkimage2segimage

Open che85 opened this issue 9 years ago • 6 comments

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)

che85 avatar May 18 '16 14:05 che85

Good point. The question is, should parameters like this be communicated in the JSON, the same way DICOM metadata is communicated, or separately?

fedorov avatar May 18 '16 14:05 fedorov

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?

che85 avatar May 18 '16 14:05 che85

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?

fedorov avatar May 18 '16 14:05 fedorov

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?

che85 avatar May 18 '16 14:05 che85

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.

fedorov avatar May 18 '16 15:05 fedorov

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.

pieper avatar May 18 '16 18:05 pieper

We have defaults for those parameters set in the CLI XML, and this has been working quite well.

fedorov avatar Jan 30 '24 20:01 fedorov