Reputation: 628
I am using VTK to build meshes from CT images. I find myself stuck trying to understand the cryptic vtkMarchingCubes::SetValue()
. As per the documentation The first parameter is said to be the contour number, the second one is the "contour value", my question here is what exactly is "contour value"? is that an intensity value?
If it is indeed an intensity value, does VTK just look for that exact value or does it look around? is there any way I can specify a range rather than a single number? My last question is, how do I extract multiple contours from the image using vtkMarchingCubes in one pass?
Upvotes: 1
Views: 1647
Reputation: 695
Yes, it is the image intensity, I.e. the level for the level-set.
Image intensities are interpolated, so if you have a voxel with intensity 0 and a neighboring voxel with intensity 1, and set the value to 0.5, the generated surface will be half-way in-between. If you set the value to 0.9, the surface will be closer to the 1 voxel.
To extract multiple contours, you'd specify multiple values, I.e
mc->SetValue(0, 60);
mc->SetValue(1, 600);
I am not sure what you would want to achieve by specifying a range?
Upvotes: 2