Design Choices
Why the app separates quantization and windowing
The app treats quantization and windowing as two different operations because they answer different questions.
- Quantization changes the stored or representable image values by reducing the number of gray levels.
- Windowing changes only the display mapping by emphasizing one intensity range and clipping values outside that range.
Because of that distinction:
MSEandPSNRcompare the quantized image against the original image.Low clipped ratioandHigh clipped ratioare diagnostics for display saturation, not accuracy metrics.
Why the app supports DICOM
Medical image quantization is easier to motivate when users can inspect higher-bit-depth data instead of only standard 8-bit PNGs. DICOM upload therefore helps the app align with real medical imaging workflows.
Why the app supports slice selection and rotation
Volumetric medical files are not naturally single-image inputs, so the app defaults to the middle axial slice and exposes a slice selector for exploration. Uploaded DICOM and NIfTI data can also require orientation correction, so the app includes an explicit rotation control for those file types.
Why the app still accepts PNG and JPG
Standard image upload keeps the demo accessible for classmates who may not have medical files available. The app converts RGB input to grayscale so the teaching focus stays on intensity processing.
Candidate public demo examples
If you prepare redistribution-safe demo exports later, these local sources are good candidates:
RSNA PE:series_relpath: test/0b2c88c2f00a/bec1b1d73f48under../datasets/rsna_pe/testRSNA PE:series_relpath: test/0a780dd0d52b/df56c2f76030under../datasets/rsna_pe/testLDCT-and-Projection-data:../datasets/LDCT-and-Projection-data/C002CT-RATE:valid_101_a_1.nii.gz_slice_0086from the local CT-RATE volume export pipeline
For the LDCT example set, smaller slice indices are typically closer to the head and larger indices move toward the hips, so slices around 100 and 270 are useful complementary demo views.