I'd like to convert a set of DICOM instances (CT, MR, X-Ray basically) to JPEG (regular 8bits lossy grayscale). I have been starring at the options from dcmj2pnm:
I am quite confident that --use-window 1
is the right option when the input DICOM instance provide a single value for (0028,1050) Window Center & (0028,1051) Window Width. What I fail to understand is what is the "right" option to choose from (when WC/WW is missing):
--min-max-window
,--min-max-window-n
(what does extreme values
mean ?),--histogram-window 5
(found ref here)Are there any good rule of thumb when processing DICOM CT (Pixel Padding Value) images ? MR images ? X-Ray images ?
Being the author of this DCMTK tool, I should be able to answer your questions.
I am quite confident that --use-window 1 is the right option when the input DICOM instance provide a single value for (0028,1050) Window Center & (0028,1051) Window Width.
This is at least true if the stored VOI window is correct (i.e. appropriate for the stored pixel data).
What I fail to understand is what is the "right" option to choose from (when WC/WW is missing):
As a rule of thumb, --min-max-window
(compute VOI window using min-max algorithm) usually creates good results. If there are extreme values in the image (very low and/or very high pixel values) that do not belong to the medical content, they can be ignored: option --min-max-window-n
ignores the minimum and maximum values (and use the next lower/higher value in the pixel data as the borders of the VOI window), option --histogram-window [n]
computes a histogram on the pixel values used in the image and ignores "n" percent of both the low and the high values (when computing the VOI window).