如何访问满足ITK C++中特定条件的特定体素?
How to access specific voxels that satisfies the specific condition in ITK C++?
我有一个 3D 图像和一个球体方程。我需要取出圆圈外的所有体素,并想对它们应用变换。我如何区分这些点和所有点?我不明白如何实际编写代码来访问满足我的标准的每个体素。
从这里开始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。
我有一个 3D 图像和一个球体方程。我需要取出圆圈外的所有体素,并想对它们应用变换。我如何区分这些点和所有点?我不明白如何实际编写代码来访问满足我的标准的每个体素。
从这里开始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。