Skip to content

Commit

Permalink
Merge pull request #600 from dougyau/voi-lut-panic
Browse files Browse the repository at this point in the history
Correctly return the first element of the array
  • Loading branch information
Enet4 authored Nov 13, 2024
2 parents bf171c0 + 501a236 commit 463d1ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pixeldata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ impl DecodedPixelData<'_> {
.fail()?
}
tracing::warn!("Expected `{:?}` rescale parameters, found `{:?}`, using first value for all", self.number_of_frames, len);
Ok(&self.rescale[0..0])
Ok(&self.rescale[0..1])
}
}
}
Expand All @@ -604,7 +604,7 @@ impl DecodedPixelData<'_> {
.fail()?
}
tracing::warn!("Expected `{:?}` VOI LUT functions, found `{:?}`, using first value for all", self.number_of_frames, len);
Ok(Some(&inner[0..0]))
Ok(Some(&inner[0..1]))
}
}
};
Expand Down Expand Up @@ -632,7 +632,7 @@ impl DecodedPixelData<'_> {
.fail()?
}
tracing::warn!("Expected `{:?}` Window Levels, found `{:?}`, using first value for all", self.number_of_frames, len);
Ok(Some(&inner[0..0]))
Ok(Some(&inner[0..1]))
}
}
};
Expand Down

0 comments on commit 463d1ae

Please sign in to comment.