MCPcopy Create free account
hub / github.com/ImageEngine/cortex / doOperation

Method doOperation

src/IECoreImage/ImageReader.cpp:602–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602ObjectPtr ImageReader::doOperation( const CompoundObject *operands )
603{
604 bool rawChannels = operands->member< BoolData >( "rawChannels" )->readable();
605
606 ImagePrimitivePtr image = new ImagePrimitive( dataWindow(), displayWindow() );
607
608 vector<string> channelNames;
609 channelsToRead( channelNames );
610
611 for( size_t ci = 0, cend = channelNames.size(); ci != cend; ++ci )
612 {
613 DataPtr d = m_implementation->readChannel( channelNames[ci], rawChannels );
614 assert( d );
615 assert( rawChannels || d->typeId()==FloatVectorDataTypeId );
616
617 assert( image->channelValid( d.get() ) );
618
619 image->channels[ channelNames[ci] ] = d;
620 }
621
622 if( !rawChannels )
623 {
624 ColorAlgo::transformImage( image.get(), m_implementation->currentColorSpace(), m_implementation->linearColorSpace() );
625 }
626
627 m_implementation->updateMetadata( image->blindData() );
628
629 return image;
630}
631
632DataPtr ImageReader::readChannel( const std::string &name, bool raw )
633{

Callers

nothing calls this directly

Calls 9

transformImageFunction · 0.85
readableMethod · 0.80
typeIdMethod · 0.80
channelValidMethod · 0.80
updateMetadataMethod · 0.80
blindDataMethod · 0.80
sizeMethod · 0.45
readChannelMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected