Skip to content

Commit

Permalink
Re-added ability to generate channel image
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRace committed Nov 16, 2022
1 parent 3050f40 commit 6880807
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "biquinho"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
description = ""

Expand Down
12 changes: 10 additions & 2 deletions src/imc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,16 @@ impl IMCDataset {
let mut image_map = HashMap::new();

for acquisition in self.mcd.acquisitions() {
let data = acquisition.channel_image(identifier, None)?;
image_map.insert(acquisition.id(), ChannelImage(data));
match acquisition.channel_image(identifier, None) {
Ok(data) => {
image_map.insert(acquisition.id(), ChannelImage(data));
}
Err(MCDError::InvalidChannel { channel: _ }) => {
// This channel doesn't exist for this acquisition (can happen sometimes if the panel was changed),
// so we just ignore this error
}
Err(error) => return Err(error),
}
}

Ok(image_map)
Expand Down

0 comments on commit 6880807

Please sign in to comment.