Closed smoothumut closed 5 months ago
Hi Umut, the problem is that the "+" sign means summing the scalar data inside volumes that have the same geometry. If the volumes have different geometries (like voxel spacing or origin) some degree of interpolation is unavoidable.
I just extended operation()
method to support logic operations, eg:
from vedo import Box, show
vol1 = Box(size=(35,10, 5)).binarize()
vol2 = Box(size=( 5,10,35)).binarize()
# vol = vol1.operation("+", vol2) # this will now give an error
vol = vol1.operation("xor", vol2)
print(vol)
show([[vol1, vol2],
["vol1 xor vol2", vol]],
N=2, axes=1, viewup="z",
)
Hi Marco, Sorry for my late reply. I was just able to return coding. Operation now it works great on logical operators also. Your interpolation under the hood saved my weeks. I have used your interpolation and also vtkImageMathematics in order to Substract from one volume to another. Without your interpolation, none of them was working THANK YOU VERY MUCH and have a great day 🙇
Hi Marco, I hope you are doing well.
I have some questions regarding volume operations. this code below somehow crashes on vtkImageMathematics Update()
here are my questions : ) 1- what do you think the problem can be for this basic boxes example ? 2- this question may look silly : ) why do box volumes are black? Am I doing something wrong while creating? (My other volumes that binarized from meshes were brown) 3- (this is general question) how can I solve or debug the problem when the problem occurs on vtk's end. Because especially on intersections, boolean operations and now this one manytimes crashes and close itself without giving any error.
Thanks in advance,