12-15-2022 08:06 AM
I want to invoke the export image node on my intensity graph, as it is described here:
Exporting a LabVIEW Graph, Chart or 2D Picture to an Image File - NI
But there is neither an export simplified image nor export image node on Intensity Graph.
But, those options exist on waveform graph.
I can't use get image node, because this exports a poor quality and even worse it exports the graph palette and cursor legend.
Solved! Go to Solution.
12-15-2022 09:19 AM
Hi Quiztus,
@Quiztus2 wrote:
I can't use get image node, because this exports a poor quality and even worse it exports the graph palette and cursor legend.
In LV2016 there also is only the "Get image" method available in an invoke node.
For the "poor quality": did you set the method to export a 24bit image?
You can use 2DPicture functions to crop the exported image data…
Or you write your own image export function as you already have the (image) data available of your intensity graph! All you need to do is to transform values of your 2D array into corresponding color values…
12-15-2022 11:25 AM - edited 12-15-2022 11:27 AM
Sorry, can't open your snippet because the version is too new. Note that the marker value can be written before the loop. No need to rewrite the same with every iteration. Once is enough!
If you use the "get image" method, you can easily trim the image data to the desired area before saving. (area bounds and size are available via property nodes). With correct settings, the quality should be identical to what you see on the front panel.
alternatively, you can of course use your data and make an image out of it directly. This will ensure that there is a 1:1 relation between data and pixels. Use palleted colors with a 256 element color ramp (according to you z scale!) and scale your data as U8 between 0 and 255.
12-19-2022 09:01 AM
it took me while, so here my solution.
12-19-2022 12:23 PM - edited 12-19-2022 12:29 PM
Seems silly to do all that song and dance if you already have the color palette! No need to expand to RGB! Here's what I would do:
Note that you might want to decimate or re-interpolate the 2D array if you want more or less pixels (Not shown. I create a picture that is the same as the intensity graph size). Currently, the picture is one pixel per data point (within +1 or -1, correct if needed).
I disabled saving the image, but you can easily activate that. I use plain LabVIEW image tools, because I don't have the toolkit. Don't need it!
12-20-2022 09:21 AM - edited 12-20-2022 09:24 AM
@GerdW wrote:
Hi Quiztus,
@Quiztus2 wrote:
I can't use get image node, because this exports a poor quality and even worse it exports the graph palette and cursor legend.
In LV2016 there also is only the "Get image" method available in an invoke node.
For the "poor quality": did you set the method to export a 24bit image?
You can use 2DPicture functions to crop the exported image data…
the get image method is like taking a screenshot of the intensity plot indicator - so you have all the axes, the z.color scale etc in the screenshot, also it's appearence (e.g. aspect ratio) will change when the size of the indicator is changed on the frontpanel.
I would use Christian Altenbach's solution.