06-22-2016 07:32 PM
I'd like to add multiple pictures (pictures = object of the labview data accessed through Grahpics & Sounds -> Picture Functions). Right now I can use one picture as an input to a picture function (such as Draw Rectangle or Draw Circle), and I can cascade different drawing commands to get a composite picture. But I'd like to store different pictures that I use for Intensity Graph overlays and toggle them on and off for the user. It seems as if a function to add two pictures, which appears to be intrinsic to all the drawing vi's, should exist but I can't find it anywhere. Does one exist?
thanks,
Doug
Solved! Go to Solution.
06-22-2016 07:35 PM
you could try simple running the wires of the two pictures into the "Add" primitive. As long as they're the same dimensions, LabVIEW will automatically do matrix addition to give you an "added" version of the two pictures.
06-22-2016 07:39 PM
No luck with that.
I dug into the "Draw Rectangle" vi and somehow it adds a picture type to another drawing (which was generated by an unspecified typecast) through a concatenate. I don't understand how that works, otherwise I'd try to backward-engineer it and make use of it.
06-22-2016 07:47 PM
Looks like "Concatenate String" does the trick. Who would have thought pictures were strings? And could be concatenated? NI might want to make this easier to find in the documentation it it's already there. Or add it if it's not.
06-22-2016 07:49 PM
From looking at it, pictures are stored in some sort of binary format, flush with opcodes and the like. Strings are just binary data, so they're simply storing all the information within a string. LabVIEW must parse it all out when it reads it to make the display.