surface plot from 2D slices

Hi , I have 24 slices of one eye from OCT images. When I load them in slicer and view in volume rendering all slices are placed in horizontally, not make a circle, I want every slices spaced at 30 degree and makes a round eye.

Can anyone please help me in this regards?

Could you add a screenshot so we have a better idea about the data?

Do you read the images from DICOM? If yes, then you might be able to reconstruct acquisition geometry by setting “Acquisition geometry regularization” to “apply regularization transform” in application settings (menu: Edit / Application settings / DICOM / DICOMScalarVolumePlugin) before loading the image from the DICOM browser.

1 Like

Thank you Andras, my images are not from DICOM, they are in jpg format. export as jpeg from OCT pentacam machine.

If you only have a set of JPEG images, then there is no information about positions of each image slice in 3D. Slicer assumes that they should be stacked on top of each other with a constant spacing. Is this a correct assumption? Or they should be arranged in some circular pattern?

As Steve asked above, could you post screenshots of how the images should appear (e.g., screenshot from your OCT imaging console) and how it appears in Slicer?

Untitled

Hi Steve, here are the screenshot, all the slices sectioning by green color, total 25 slices from whole section.
Now i want to reconstruct the original round image from all of those slices.

Hi Andras, they should be arranged in circular pattern. I also upload the real images in reply of Steve and here I am uploading how they appear when I saw as volume rendering.

It could be great if I select every slices and I can manually fix their position.

Thanks, those images help a lot. The acquisitions need to be resampled into a rectilinear space for Slicer to volume render them. There are many ways to do this with a little programming, but no point-and-click method right now that I’m aware of. If you are up for the programming we’d be glad to give some suggestions.

Thanks Steve, I can do some programming, would you please tell me the details.

Great, well, depending on how concerned you are about efficiency you might need to try some more sophisticated methods, but I’d suggest starting with something simple that you can use as a baseline.

As an example, here’s an easy way to make a volume node with random data in it. Run this in the python interactor and you should be able to see the random noise in the slice views.

n = slicer.mrmlScene.CreateNodeByClass('vtkMRMLScalarVolumeNode')
n.SetName('my volume')
slicer.mrmlScene.AddNode(n)
import numpy
slicer.util.updateVolumeFromArray(n, numpy.random.sample([30,30,30]))

Working from there you could make an array of zeros instead, and then iterate through the OCT slices and just copy (or interpolate) the pixels into the corresponding voxels. Since you have the jpg files loaded you can get them as numpy arrays with slicer.util.arrayFromVolume(volumeNode).

Thank you Steve, I will try these code and let you know how it goes.