10-18-2010 04:25 PM
Yes, but being in two different buildings makes things a bit difficult. Especially since they are not on the same campus. To be honest, I have never met Doug in person.
10-21-2010 12:36 PM
Wow - no one has figured this out yet. I guess I am not the only one having trouble. NI engineers - can you help us here?
Thanks,
Don
10-22-2010 11:24 AM
Don,
I apologize about the late response. The forum seemed to have taken a left turn so perhaps the issue was resolved but this was the the case. I looked at your code and it is unclear to me what you are trying to accomplish. Are you trying to remap the color levels?
It seems like you successfully remap the color levels but do not redraw the image.
This cannot be done through simply editing the color table and asking it to redraw. Instead you will need to use array functions to replace any element with the color in question with the replacement color.
I gave a crude effort to try and do this with the attached file. Its acts strangely but I think it will lead you in the right direction.
-Ben
10-22-2010 01:18 PM
Hello Ben -
1) I have already created a VI using an actual value replacement approach.
2) But the premise you pose about not being able to use the color table approach I believe to be incorrect. Substitute the attached VI for the original 'normalize' VI I had attached. You can see how the colors will change using the color table approach. I think the issue is that the color ramps need to be adjusted from 1 to 254 rather than 0 to 255. If we can confirm this, then I think we can say we have the solution.
10-22-2010 01:32 PM
Good catch! I see that for one reason or another the indices of the color table seem to be acting strange. Simply track down the right index you need using an array indicator (I had one set at 0 and one set at 253 so I could see the relevant elements of the array) and you should be able to pull this off.
10-28-2010 10:30 AM - edited 10-28-2010 10:30 AM
Finally getting back to this. I used my revised routine on an image containing many shades of gray today. Seems to work fine. So I think that the way I normalize the data to between 1 and 254 should be considered the solution allowing this type of color table manipulation.
Sincerely,
Don