You're awesome! Ill work with this today, and see where I get. 

In addition to changing the channel names I also wanted to be able to combine 
the channel data from the rgb channels from each layer into one. In python I 
just created a dictionary, grouped the rgb channels and used array to convert 
them. So (customlayer.red, customlayer.blue, customlayer.green) became 
(newlayername.customchannelname(combined pixel data from red, green, blue)). In 
C++ it doesn't seem seem as simple. Do you have any suggestions for doing the 
same in C++?

Thanks again!!



On Dec 13, 2015, 8:48 PM, at 8:48 PM, Peter Hillman <[email protected]> wrote:
>You cannot modify a channel name because the ChannelList object keeps 
>them sorted. If you wish to rename a channel within a list, you must 
>delete it and reinsert it with the new name, or else assemble a 
>completely new ChannelList containing the channels the way you want.
>
>You may find the source of the multiview utility instructive:
>https://github.com/openexr/openexr/blob/master/OpenEXR/exrmultiview/makeMultiView.cpp
>That reads in channels from the input(s) and writes them out with 
>different names.
>You could drop a channel from the output file by making these two lines
>
>conditional:
>header.channels().insert(outChanName, inChannel);
>and
>outFb.insert(outChanName,image.channel(outChanName).slice());
>
>
>
>On 12/12/15 08:02, Aaron Carlisle wrote:
>> In the ChannelList::Iterator and ChannelList::ConsIterator name() is 
>> being defined as a const char * name () const, which means I can't 
>> change the name. Is there anyway around this? I just want to be able 
>> to change the channel name. I tried converting name into a string
>then 
>> back into a const char * which works, but I have significant data
>loss 
>> and the pixels no longer show up in the image.
>>
>>
>> _______________________________________________
>> Openexr-user mailing list
>> [email protected]
>> https://lists.nongnu.org/mailman/listinfo/openexr-user
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Openexr-user mailing list
>[email protected]
>https://lists.nongnu.org/mailman/listinfo/openexr-user
_______________________________________________
Openexr-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-user

Reply via email to