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

Channel groups (legacy layers) #147

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

johannesvollmer
Copy link
Owner

@johannesvollmer johannesvollmer commented Jan 3, 2022

  • add separate tests for the channel name parser and collector
  • add builder methods
  • test for specific channels in particular
  • add user channelfilter?
  • revisit public interface and add convenience methods
  • examples
  • Guide Update

@johannesvollmer johannesvollmer changed the title Channel groups Channel groups (legacy layers) Jan 3, 2022
let new_child_groups = HashMap::with_capacity(self.child_groups.len());
let child_groups = self.child_groups.into_iter()
.map(|(name, child)| Ok((name, child.try_map(&mut mapper)?)))
.try_fold(
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

})
impl<Channels> ChannelsWriter for GroupChannelsWriter<Channels> where Channels: ChannelsWriter {
fn extract_uncompressed_block(&self, header: &Header, block_index: BlockIndex, output_block_data: &mut [u8]) {
for channels_group in &self.all_channel_groups {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each subgroup will write to the same few first bytes, overwriting each other. Incorporate some kind of offset?

GroupChannelsWriter { channels_list: channels }
GroupChannelsWriter {
all_channel_groups: self.all_channel_groups()
.map(|channel_group: &ChannelGroup| panic!("this uses relative names but expects absolute names, and all will write first byte")/*channel_group.create_channel_group_writer(header)*/)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SpecificChannels currently does a lookup based on the channel name, in order to find the byte offset, for each channel. This cannot work as the meta data channels have absolute names while the SpecificChannels don't

Ok(ChannelGroupsReader {
channels: channel_groups,
indexed_channels,
let reader = self.read_channels.create_channels_reader(header, &group_selected_channel_indices);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, meta data contains fully qualified names, but the specific channels and any channels must work with relative local names. Pass some kind of string map instead of only indices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ChannelGroups? Support RgbaImage for groups legacy channels Simplify multilayer files
1 participant