I have a 3D image and a sphere equation. I need to take out all the voxels that are outside the circle and want to apply a transformation to them. How do I differentiate those points from all the points? I'm not understanding how to actually write the code to access each voxel that satisfies my criteria.
Asked
Active
Viewed 234 times
1 Answers
2
Start from this iterator example. Use image->TransformIndexToPhysicalPoint()
. Apply your sphere equation to physical point coordinates to determine whether a pixel is inside or outside. If you want to modify pixel values, it.Set(newValue);
should do it. Possibly look at other iterator examples.

Dženan
- 3,329
- 3
- 31
- 44