vedo icon indicating copy to clipboard operation
vedo copied to clipboard

How to extract the volume of interesting from a 3D image by free-hand ROI?

Open zhang-qiang-github opened this issue 5 years ago • 5 comments

When analysis 3D image data by rendering, some tissue is unconcerned and it would distrub the analysis. Thus, I want to crop the image by a free-hand ROI just like RadiAnt: p1 In the above picture, the green polygon is the ROI, and I want to crop the outside image. The result is expected to be: p2 Thus, we can focus on the intrested arteries.

If I have the vtkImageData and the 2D coordiante of ROI, how can I crop the image? Has vtkplotter implemented this function? The shown image may be surface rendering or volume rendering or MIP (maximum intensity projection).

zhang-qiang-github avatar Jan 28 '20 15:01 zhang-qiang-github

Hi - you can 'cut' volumetric data only in a ROI which is of box-like shape.

from vtkplotter import load, datadir
vol = load(datadir+"embryo.tif")
vol.crop(VOI=(20,100, 40,60, 20,80))
vol.show()

image

See also here.

marcomusy avatar Jan 28 '20 23:01 marcomusy

Is it possible to cut it by free-hand ROI?

zhang-qiang-github avatar Jan 29 '20 10:01 zhang-qiang-github

no - unless you make an isosurface out of the volume.

marcomusy avatar Jan 30 '20 11:01 marcomusy

There may be a solution. Firstly, we can create a 3D mask using the ROI. Then, we rotate the mask according to the transform matrix. Last, we apply mask*volume to remove the unconcern tissue.

If I implement this solution, I would upload the code.

zhang-qiang-github avatar Jan 31 '20 02:01 zhang-qiang-github

I find it is difficult for me to create such a 3D mask. Slicer has implement such function.

zhang-qiang-github avatar Feb 03 '20 05:02 zhang-qiang-github