3D reconstruction of an object from slices in cylindrical coordinate system

Hello everyone! I want to reconstruct a pyramid from its slices stored in .jpeg images in order to test 3D reconstruction algorithms and familiarize myself with the VTK library. I’ve read the main chapters of the VTK book and understand the basic library architecture. I have a difficulty in how to load and arrange my 3D slices; I see my visualization workflow as follows: Data (Slices) → (Preprocessing step) → vtkMarchingCubes → vtkPolyDataMapper() → vtkActor() → vtkRenderer(). Can you help me with the preprocessing step? I only have seen examples for parallel slices from medical images in DICOM format.

If your slices are essentially pixel data, your output of reconstruction should be of type vtkImageData.

If your slices were in the cartesian coordinate system, all you have to do is stack them up in a vtkImageData along the Z-dimension. In the case of a cylindrical coordinate system, you’d have to come up with the transformation yourself. Note that vtkImageData is axis-aligned.

1 Like

I meant that my slices are arranged as in the picture and they are not parallel to each other, and I am not sure what VTK data structure should I use to arrange them this way before passing to vtkMarchingCubes algorithm.

I see. In that case, you’d have to implement a custom vtkImageAlgorithm that populates the voxel intensities in the output volume by probing the input slices. I don’t believe something like this exists currently in VTK.

1 Like