Search code examples
image-processingmultidimensional-array3dpython-3.5point-clouds

Brain tumor reconstruction as 3D mesh via 2D MRI scans in Python


My program takes 2D Brain-MRI Voxels as an input, from a top down view of a brain, and my goal is to create a 3D model from the MRIs of JUST the tumors.

I've been able to apply a thresholding function which contrasts the MRI images, making the cancer significantly more visible (cancer becomes pure black and the rest of the brain becomes pure white).

Now comes the hard part - I'd like to use edge detection to create a point cloud of JUST the cancer in each slice of the MRI, and then create a mesh from the collective point clouds of each slice, to model the cancer in three dimensions.

The MRIs I'm working with are centred in the XY plane and simply extrude upwards along the Z axis as they scan upwards through the brain, I think I can make a series of 2D point clouds for each image, and then "stack" the point clouds evenly across the Z axis, with a consistent Z distance between each slice.

Does that sound doable in a month? Any recommendations of a streamlined way of accomplishing this?


Solution

  • Any particular reason you want to use a point cloud? Constructing a surface mesh from point clouds can be a colossal headache, especially if you're dealing with a voxel-based volume representation in the first place. The usual approach when dealing with medical imaging (and voxel data in general) is to use something like the Marching Cubes algorithm on the voxel volume of interest to create a polygonal surface mesh.

    So as a general approach, I'd recommend first constructing the 3D voxel volume of the tumor(s). To do this, traverse the slices and create somekind of 3D array of values based on your pixel contrast threshold in the slice. Once you have your voxel volume, you can use the marching cubes/tets algorithm to get a nice smooth mesh of the volume. I spared the details but hopefully you get the idea.

    Hope that helps!