Which ITK/SimpleITK filter can cut down a bit of volume and let the rest as it is ? To be more specific: user choose a point, 3d point. And I am intend to use this point into a filter that will make a hole around that point plus minus, let say, 20 pixels. Is there any filter that can do that ?
It is unclear what “make a hole around that point…” means. Do you just want to set the pixels/voxels around that voxel to 0, or -1000 (HU value for air)? Why do you need a filter to do this, instead of directly assigning the values as shown below?
import SimpleITK as sitk
img = sitk.Image([256,256,30], sitk.sitkInt16)
index = [40,30,20]
print(img[index])
img[index] = -1000
print(img[index])
So, if I go around that 3d point with 20 pixels, and setup Image values to 0, is kind of what I need (for the moment) … but as long I don’t know Python, can you tell me how to access img[40,30,20] in C++ ? I didn’t saw any operator here: SimpleITK: sitkImageOperators.h Source File
In order to avoid translating SimpleITK to ITK, is there any way to use an iterator in SimpleITK only ? Or, a way to access that img[40, 30, 20] in SimpleITK ?