LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change colors of individual pixels on intensity graph?

I would like to be able to change the color of a set of individual pixels within an intensity graph, to blue for example, while leaving the color table otherwise as is, for example, gray scale.  The change to blue would be based on location, not on current gray value.  I think I can accomplish this using the mask fx with picture controls, and then convert to intensity graph.  Is there a more direct way?  A good example to demonstrate this capability would be just using a 'mouse down' event on an intensity graph to change the color at the mouse location.  Any thoughts are appreciated.

Sincerely,

Don
0 Kudos
Message 1 of 15
(7,666 Views)
You could just move a few cursors of the desired color and style (e.g. square point, no lines) to the target locations.
 
Message 2 of 15
(7,662 Views)

Actually, that is a great idea.  The only problem is the number of points that I may need to change color to could be significant (100s?). If there is no limit on the creation of cursors, this could be a pretty cool idea and I am going to play with that today and provide a status.

 

Sincerely,

 

Don

0 Kudos
Message 3 of 15
(7,642 Views)

Good news - I am able to make this work because it is possible to create cursors programmatically using the 'CrsrList' property node.

See attached.

0 Kudos
Message 4 of 15
(7,639 Views)

The first version I posted used an OpenG fx.  Here is the code again with just the normal LabVIEW fxs (v7.1).

Thanks again for even bringing this idea up.

 

Sincerely,

 

Don

0 Kudos
Message 5 of 15
(7,636 Views)
 
 

Yes, seems to work fine :).

If you have LabVIEW 8.0, there is another possibility. There is a new property that allows drawing any pictures or picture elements on your graph area. Of course you could draw individual pixels, but nothing prevents you from e.g. drawing circles, squares, odd shaped areas, arrows or event text. ... Anything you could do with a plain picture indicator. One example that ships with LabVIEW 8.0 is Envelope.vi, see image.

Message Edited by altenbach on 06-12-2006 07:31 PM

 

(EDIT: Attached the old LabVIEW 8.0 example by request as llb)

Download All
Message 6 of 15
(7,628 Views)
Hello Don,

a different way would be to use under/overrange-feature of the intensity graph. All 'normal' pixels are displayed using the gray scale, the 'extraordinary' pixels use the overrange color...
(An intensity chart uses 256 colors. Color #0 and #255 are used for under- and overange, respectively. Color #1 to #254 form the 'normal' scale. See attached picture: the big intensity graph uses orange as overrange...)

Message Edited by GerdW on 06-13-2006 10:02 AM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 15
(7,621 Views)
I have had LaVIEW 8 sitting uninstalled on my desk for months.  I plan to get it installed soon.  I need to keep current configuration control (v7.1)  constant for what I am working on at the moment.  But I am going to print out what you have shown here and put it with my LV8 manual for future reference.  Great to know that graphs are getting some new very useful features.
Don
0 Kudos
Message 8 of 15
(7,613 Views)

Gerd: your solution is based on coding points based on current gray value, not spatial location, right? If so, I have done what you have shown here for another application in which I code outlier points (those of value greatly different than the mean) blue if very low and red if very high.  I modify the color table by making blue the 0th color and red the 255th color of an otherwise normal gray scale.

 

Thanks,

 

Don

 

Message Edited by DonRoth on 06-13-2006 07:07 AM

0 Kudos
Message 9 of 15
(7,608 Views)
Finally getting around to looking at the new graphic draw capabilities in LV8+.  In LV8.0, I searched using 'Find Examples' and went thru the New Examples Folder manually to try to find a VI entitled 'Envelope.vi'.  I do not find it.  I also searched ni.com but could not locate it.  Please advise. 

Thanks,

Don
0 Kudos
Message 10 of 15
(7,506 Views)