Jump to content

IntensityGraph data to image dysplay


Recommended Posts

Hi !!

I would like to cast a intensity graph data type to a Image display.ctl. I am adding some funcionality to an old program, and it would be really usefull have the ROI tools that it control offers, but the ascii file I have as source contains an intensity graph data tpe, and I am not able to cenvert it. I read about Lookup tables, but I don't know which parameters should I use, also tried the predefined ones, without success.

I can see something in "Binary" mode, but too bad.

Do you know how can I cast these types?

Thanks in advance!

Link to comment

Hi !!

I would like to cast a intensity graph data type to a Image display.ctl. I am adding some funcionality to an old program, and it would be really usefull have the ROI tools that it control offers, but the ascii file I have as source contains an intensity graph data tpe, and I am not able to cenvert it. I read about Lookup tables, but I don't know which parameters should I use, also tried the predefined ones, without success.

I can see something in "Binary" mode, but too bad.

I only understand chinese here. Sorry but what are you trying to do here??? An ASCII file that contains the source to an intensity graph? Typecasting Intensity Graph to a Image Display.ctl?? That are two entirely different types of data, the Intensity graph being a 2D array of numbers being displayed in a particular way, while the Image Display.ctl is the IMAQ control to display bitmap data. Typecasting only works for data that is interchangable from one format to the other without changing the memory content, but that is not a possibility between these two data types.

Most likely what you want to do is to take your Intensity Display 2D data and display it in the IMAQ display in a similar way. But that requires a conversion, not a typecast. One possibility for this would be to use the IMAQ ArrayToImage.vi function from the IMAQ Toolkit. I would assume that you have that Toolkit installed if you have the Image Display.ctl in your palettes.

Link to comment

Sorry If I didn't use the proper words, english is not my mother tongue. You are right guessing my intentions.

I have an ASCII file comming from an atomic force microscope which represents an image which is now displayed in an intensity graph, I would like to show it in an Image display.ctl, in order to use the ROI tools to select specific zones that in the intensity graph you can only use the area among two cursors.

I have tried yet ArrayToImaq.vi but it displays a black image or if I change the palette to binari I'm able to see the main shapes of the image in red but too unfocused.

Thanks.

Link to comment

I have tried yet ArrayToImaq.vi but it displays a black image or if I change the palette to binari I'm able to see the main shapes of the image in red but too unfocused.

Well the IMAQ ArrayToImage.vi of course has several inputs. Depending on the input you use, you may need to scale the intensity data to get a reasonable result. Not having seen the data in your ASCII file yet I can't really say much as to what scaling you may need. But assuming that you have for instance integer values between 0-255 you should connect the array to U8 input, for value between 0 to 65635 you should connect it to the U16 array input and so on. This VI will only create monochrome images but I assume that is all that you need, since the intensity graph only really displays single plane data too.

Link to comment

Yes, I tried all the different inputs, and also apply to the data a Lookup table, but I haven't got a reasonable image.I would say the values are between 0 and 255, I wanted to upload the ASCII file but I'm not allowed to upload that kind of file to the forum. It has a header and after it the Image information, I have a SubVi which extracts the image information only.

Link to comment

Yes, I tried all the different inputs, and also apply to the data a Lookup table, but I haven't got a reasonable image.I would say the values are between 0 and 255, I wanted to upload the ASCII file but I'm not allowed to upload that kind of file to the forum. It has a header and after it the Image information, I have a SubVi which extracts the image information only.

Of course you should also select a compatible Image Type for the IMAQ Create.vi. If your statement is true that the values would be between 0 and 255, I would expect that the image type Grayscale (U8) should be working.

Link to comment

Well the rotation can be handled by some Transpose Array I would assume. It's not a big problem right now.

And if you create an U8 greyscale IMAQ image, you better connect an U8 data array to the U8 input of your IMAQ ArryaToImage function. But why did you say your numeric values are integers between 0 and 255? The Z value in the intensity graph only shows a 0 and 1 in the cursor display. So I really very much doubt that your values are between 0 and 255 and they are definitely not U8 but rather floating point values.

So what is the minimum and maximum value in your 2D array?

  • Like 1
Link to comment

http://dl.dropbox.com/u/17940236/Cilindro%201%2C15nm_10

http://dl.dropbox.com/u/17940236/ImageFile

Here you have two examples of diferent image files, ImageFile is the one of the screens I post before, and it has 1.76859 Z amplitude, and the second one has a 23 Z amplitude. I don't know exactly the minimun and maximun possible because I am not the one who generates the source file it comes from an external company and they don't say anything about it in the format specifications. I do not know if have a look into this files will be helpfull.

Link to comment

http://dl.dropbox.co...o%201%2C15nm_10

http://dl.dropbox.co...40236/ImageFile

Here you have two examples of diferent image files, ImageFile is the one of the screens I post before, and it has 1.76859 Z amplitude, and the second one has a 23 Z amplitude. I don't know exactly the minimun and maximun possible because I am not the one who generates the source file it comes from an external company and they don't say anything about it in the format specifications. I do not know if have a look into this files will be helpfull.

Multiply your array values by 255/Z Amplitude for displaying. [e.g Value * Round(255/1.76859)]

Edited by ShaunR
  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.