QIICR / QuantitativeReporting

Segmentation-based measurements with DICOM import and export of the results.
https://qiicr.gitbooks.io/quantitativereporting-guide
Other
23 stars 23 forks source link

Check validity of the measurement before passing it to tid1500writer #186

Open fedorov opened 7 years ago

fedorov commented 7 years ago

Some of the measurements sometime can have invalid values. As an example, peak measurements produced by the PET plugin will be "nan" for small volumes.

Maybe it will be good to check if the quantity produced by the plugin is a number, and if it is not - not copy it to the JSON to be passed to the tid1500writer? Or maybe it will be sufficient to handle it in dcmqi to ignore such values - the error is raised in https://github.com/QIICR/dcmqi/blob/master/apps/sr/tid1500writer.cxx#L208? Or both?

Related issue that I am not sure we discussed before: need to test what will be the behavior of the table if there are different sets of measurements for different rows.

lassoan commented 7 years ago

When a table column is set to floating-point type then it can store NAN values. It can be entered to the table as "nan", and currently displayed as "1.#QNAN" but we can change the implementation so that it is displayed and can be entered as an empty string.

For integer types there is no special value for missing data in most programming languages. In Slicer tables, there is a default value specified for each column (that is used when you create a new row), which could be used as a placeholder for missing data. We could also quite easily add another "empty value", which would be displayed as en empty string in the table.