read 3d.fig xyz

Hello I have an image 3d.fig and i want to read the x and y and z coordinate how can I?

Answers (1)

Star Strider
Star Strider on 10 Feb 2015

0 votes

I would use the openfig function to read and load it, and then the get function to access the various properties, such as 'XData', 'YData', and 'ZData'. See the documentation for details.

10 Comments

mohamad
mohamad on 10 Feb 2015
I try this way but it couldn't solve the problem
Star Strider
Star Strider on 10 Feb 2015
Telling me that ‘it couldn't solve the problem’ does not give me any useful information.
What did not work?
What code did you use? (Paste it in your next Comment, and use the [{}Code] button to format it.)
Were there any errors? If there were, please copy them in their entirety and paste them with your next Comment. Include the lines of your code the errors refer to.
It would also be helpful if you attached your .fig file to your original Question (or at least to your next Comment). Use the ‘paperclip’ or ‘staple’ icon to do that. That way, we can work with it to see what it contains, and may be able to help you get the information you want from it.
mohamad
mohamad on 10 Feb 2015
Edited: Star Strider on 11 Feb 2015
open('3d_ssfs.fig');
im = frame2im(getframe(gcf));
that's what I used and it's work thank you for respond
Image Analyst
Image Analyst on 10 Feb 2015
That does not look like it would retrieve the x, y, and z data, but whatever...as long as you think you got it working.....
mohamad
mohamad on 11 Feb 2015
your right it doesn't work because when I make rotate to 3D , z goes different so is there any way can i by it catch the x and y and z coordinates
Star Strider
Star Strider on 11 Feb 2015
Unless you attach '3d_ssfs.fig' so we can experiment with it, we cannot help further.
Good luck!
mohamad
mohamad on 11 Feb 2015
this is the image which i want to get the x and y and z
Star Strider
Star Strider on 11 Feb 2015
I loaded it but I cannot get any information at all out of it with respect to coordinate data. (I thought it was a plot. I can deal with them.)
I will leave it to Image Analyst to see if there is coordinate information in it. I can’t find it, in spite of ‘handle-diving’ as much as I can.
I will be interested in how to get information out of such a file.
mohamad
mohamad on 11 Feb 2015
ok, that's the problem when you load it you won't get any information but when you put the cursor at the image it show to you that there is a data(x,y,z)how can i get this data from this image?
Star Strider
Star Strider on 11 Feb 2015
The only solution I can come up with is to manually go to the ‘File’ menu in the figure GUI, choose ‘Save As’, and choose the ‘*.jpg’ option to save it as an image. All the data should be available to you then when you open it as an image. (There may be a way to do that programmatically, but I can’t find it in the documentation, at least not with your particular figure file.)

Sign in to comment.

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 10 Feb 2015

Commented:

on 11 Feb 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!