Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes discrepancy between multi and single frame decode_pixel_data #562

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions pixeldata/src/gdcm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,6 @@ where
DicomValue::Sequence(_) => InvalidPixelDataSnafu.fail()?,
};

// pixels are already interpreted,
// set new photometric interpretation
let new_pi = match samples_per_pixel {
1 => PhotometricInterpretation::Monochrome2,
3 => PhotometricInterpretation::Rgb,
_ => photometric_interpretation,
};

let rescale = zip(&rescale_intercept, &rescale_slope)
.map(|(intercept, slope)| Rescale {
Expand Down Expand Up @@ -175,7 +168,7 @@ where
cols: cols.into(),
rows: rows.into(),
number_of_frames,
photometric_interpretation: new_pi,
photometric_interpretation,
samples_per_pixel,
planar_configuration: PlanarConfiguration::Standard,
bits_allocated,
Expand Down
Loading