Hi Kay,

> Can you propose a way to allow a plugin to access and modify the
> Images? So far, the plugin receives the Panorama as it's sole
> parameter. So it has to go via the Panorama to access the images, and
> getImage() seems to be the way to access them, since it provides
> access to the actual image data and not merely a copy.

This should work like in C++:
To manipulate single image variables you could use updateVariables and
getImageVariables/getVariables/getter methods of a SrcPanoImage object
(e.g. returned by getImage/getSrcImage).
Alternatively you could use getSrcImage/setSrcImage to manipulate the
image variables.

Both variants do only modify the value of image variables. If you want
to change the link status use linkImageVariable##name/
unlinkImageVariable##name of panorama class.

> Somehow we'll have to figure out a way to allow plugins
> to modify image data, otherwise the plugin interface would be
> crippled.

See above.

>
> And while I'm at it, I find the data structures associated with stacks
> a bit hard to understand. Is there documentation which would help me
> to understand the implementation better so I can make a better plugin,
> or could you give me a brief explanation of the relevant classes,
> members and methods?

from image_variables.h

// stack information
// Currently only the link information is used, the value means
nothing.
image_variable( Stack, double, 0.0 )

The getStack/setStack returns/set only meaningless values. So for
stacks you need to work with imagevariables linking.
To get linkstatus you need to use a SrcPanoImage (e.g. using return
value of panorama.getImage). Use StackIsLinked/StackIsLinkedWith.
To set/change linkstatus use Panorama.linkImageVariableStack/
Panorama.unlinkImageVariableStack.

Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Hugin and other free panoramic software" group.
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/hugin-ptx

Reply via email to