06-02-2008 11:08 AM
06-03-2008 05:38 AM
06-04-2008 09:58 AM
Hi,
Thanks for that...
I have everything working as I want it to but tried to implement a colour map for the 3D graph (I can't believe one isn't a standard option?!) using an intensity graph - infact the code came from another thread on here.
The problem is I cannot work out why some of the intensity plot shows as yellow instead of red, this breaks the colour map (yellow bit at the top). Does anyone know how to make the colour map work correctly - I've set the contours on the 3D graph to go from blue to red not black to white but looking through the code I can't see why this would break it.
Many Thanks
Chris
06-05-2008 09:42 AM
Hello Chris,
Once again, I am going to let the .vi do the talking Attached is a very simple method of defining the colour table of an intensity graph, using an array of clusters. The block diagram is incredibly simply, and doesn’t really require further documentation or explanation. At the moment, i am stumped as to why using the colours from the 3D plot is creating an erronious colour map for the intensity chart.
The attached vi is a simplistic example, but it may inspire you to a solution.
Best wishes,
06-06-2008 04:07 AM
06-09-2008 10:19 AM
Hi Chris
Have you tried changing the representation of the 'type' input to the 'variant to data' function to double precision? You can just right click on the array constant that you already have and change the representation there.
With regards to saving two plots as a single jpeg, I have not yet been able to find a method of doing this. Do you need to do it programmatically? One option you could have is to save the front panel as jpeg. Would this be suitable?
Regards
06-09-2008 10:27 AM
Hi Bejal,
A couple of quick notes (no time to read whole thread).
LV and CW colors are different one is RGB and the other is BGR.
Do an "invoke node" get image to get the image in the ActiveX container (hint: create invoke node from FP)
See here for Boltzmans find about 3d images.
Ben
06-09-2008 10:30 AM
Hi,
Yes i had been trying that but it didn't make any difference - however i took an array constant from another vi and it worked fine (for some reason it just didn't seem to change the precision even when i changed the original array constant to double precision).
If that is the only way to do it then I can make it a possibility, I'll enlarge the plot etc to fill most of the front panel and then the user can just crop the output image. However what resolution file will that output - i would really like it as high as possible?
Thanks
Chris
06-10-2008 03:44 AM
Hi Chris
You can use the 'get panel image' invoke node to get the image data of the VI. This invoke node will need to be associated with the VI itself rather than a individual control. There is a parameter on this invoke node which allows you to select just the visible area on the front panel. You can set the 'visible area only' parameter to true (it is true by default). Then if you make sure that the size of the front panel is such that only the 3D graph control and the intensity graph are visible.
Once you have the image data from this invoke node you can use the 'Write jpeg file.vi' to create the jpeg image. I am not sure if the resolution will be appropriate but it might be worth you trying it out to see.
I have attached an image below showing the implementation of this.
Let me know how you get on
Regards
06-10-2008 04:59 AM
Hi,
Thanks for the information. I got the front panel image but the quality isn't great - am I right in thinking it is only captured at 96dpi?
Am i able to save the cwgraph plot directly at a higher resolution (i read somewhere you can specify it?) and then also save the colourmap as another image (again I found an example of saving partiular objects however that looked quite involved). I could then open the two images and crop and position them to form the plot with colourmap by its side.
Could you detail how you save just the cwgraph image - i can't find the controlimage property?!
Also do you know how I can make the x and y axis dependent - i.e. so they have the same scale so that my image is sized correclty?
I'm using the colourmap from the intensity graph by sending an array of 6 colours with 6 values but this means there are only 6 range markers - is there a way of setting the increments of the range shown to fill in the gaps or do I have to feed in 12 colours and 12 values (i don't want to have to do that!)
Sorry for all the questions....:)
Cheers
Chris