Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zhang-qiang-github opened this issue Jan 28, 2020 · 5 comments

Comments

@zhang-qiang-github
Copy link

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).

@marcomusy
Copy link
Owner

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.

@zhang-qiang-github
Copy link
Author

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

@marcomusy
Copy link
Owner

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

@zhang-qiang-github
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants