TIFF Metadata Clarification

TIFF Metadata Clarification  

  By: rictoo on Jan. 1, 2025, 12:50 p.m.

Hi! You state:

Task 1: One .tif file with segmentation results and metadata, including XResolution, YResolution, SMinSampleValue (excluding background), and SMaxSampleValue.

However, in the baseline repo, you have:

 ('MinSampleValue', 'I', 1, int(1)),
  ('MaxSampleValue', 'I', 1, int(max_val))

Should we be using S[Min/Max]SampleValue or [Min/Max]SampleValue?

Thank you!

Re: TIFF Metadata Clarification  

  By: mschuiveling on Jan. 3, 2025, 8:27 a.m.

Hi Rictoo,

I see you already were able to upload a functional container so I guess you already figured a part out. Regarding why we need to use it: It does not matter whether MinSampleValue or SMinSampleValue is used (same for MaxSampleValue/SMaxSampleValue). This is because in GC's image build source code, the SMin/SMax-value will be used as a fallback if the Min/Max value is not given. See: https://github.com/DIAGNijmegen/rse-panimg/blob/main/panimg/image_builders/tiff.py in the function get_min_max_sample_value(). It is best to use MinSampleValue and MaxSampleValue like we do in our code (also suggested by GC).

Good luck with the challenge and thank you for joining!

Kind regards, Mark

Re: TIFF Metadata Clarification  

  By: rictoo on Jan. 3, 2025, 5:03 p.m.

Thank you for the help Mark, that's perfectly clear! :)