I was wondering if someone can help with figuring out the pixel spacing caclulations performed by the WSI Dicomizer.
I have a TIF-file that I want to convert to DCM using the command line arguments (more omitted):
"OrthancWsiDicomizer.exe" --imaged-width 4.1664 --imaged-height 4.7616
After the DCM-files are create, I run dcmdump and the file contains:
(0048,0001) FL 4.1664 # 4, 1 ImagedVolumeWidth
(0048,0002) FL 4.7616 # 4, 1 ImagedVolumeHeight
(0048,0003) FL 0.001 # 4, 1 ImagedVolumeDepth
(0048,0006) UL 10240 # 4, 1 TotalPixelMatrixColumns
(0048,0007) UL 8960 # 4, 1 TotalPixelMatrixRows
(0048,0008) SQ (Sequence with explicit length #=1) # 44, 1 TotalPixelMatrixOriginSequence
...
(0028,0030) DS [0.00046499999\0.00046499999] # 28, 2 PixelSpacing
Note, the TotalPixelMatrixColumns and TotalPixelMatrixOriginSequence values are pulled from the TIFF file by the dicomizer (these values are correct, the image is more wide than tall).
I can't figure out the calculated pixel spacing values. The standard says (emphasis added):
10.7.1.3 Pixel Spacing Value Order and Valid Values
All pixel spacing related Attributes are encoded as the physical distance between the centers of each two-dimensional pixel, specified by two numeric values.
The first value is the row spacing in mm, that is the spacing between the centers of adjacent rows, or vertical spacing.
The second value is the column spacing in mm, that is the spacing between the centers of adjacent columns, or horizontal spacing.
That would mean (0048,0008) should be ( 4.7616/8960 \ 4.1664/10240) which is (0.0005314/0.0004068). The pixel spacing values in the DCM file seem to be computed from ImageWidth/PixelRows and ImageHeight/PixelColumns.
Does this have something to do with the Supplement 145 explanation of the image orientation being rotated by 90 degrees relative to the slide coordinate system or is the dicomizer program incorrect?
Thank you very much,
Jack