Mapping xyz points defined on circumference of sphere to 2D projection

5 views (last 30 days)
Hi Matlab community,
I have been working on this for almost two weeks, and need help! I have a brain image that I've projected onto a sphere, written to a 3D image, and read that image into Matlab. I now want to project this sphere (with no overlap)onto a 2D plane. My plan was to use Matlab's mapping functions (perhaps a mercator projection?) but I don't have experience in mapping, and the documentation is poor and I can't get any of them to work. I've been trying tricks to flatten it, like cutting it into pieces, mapping overlapping voxels to the nearest empty voxel, but most of them are extremely warpy. The best I've done is mapped a half sphere onto a 2D plane, of course with voxels overlapping around the edges. Can anyone help me (with specific examples) to take a 3D matrix of some N x,y,z points (defined on the edge of a sphere) and map them onto (any!) 2D projection?
Thank you!
Best,
Vanessa
This shows my original brain image projected into the sphere.
Here is a simple method stepping through the z dimension, finding all the nonzero voxels in the slice, and writing them to a row. The image on the left is the actual values, and the right shows the voxel index:
Here is the same idea, but I use interp1 to stretch each row to fit the same width. The image on the right shows the sphere flattened onto the 2D plane (there is overlap there), just to get a sense of what the shape "should" look like. Clearly the image on the left is not similar :(

Answers (0)

Community Treasure Hunt

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

Start Hunting!