I'm using VTK to render a 3D model from DICOM files. I want to be able to display the model tissue by tissue. I mean, for example, displaying only the bones, or only the skin etc...
I found this usefull class vtkContourFilter. With it, it is possible to do something like :
vtkContourFilter *filter = vtkContourFilter::New();
filter->SetValue(0, 650);
The higher the second value is, the deeper it goes inside the model. That way, with my sample of dicom files, I've been able to display only the bones with a value of 650.
And if I set it to -150, I can see the skin.
So if I do:
filter->SetValue(0, 650);
filter->SetValue(1, -150);
I will have two contours, with bones and skin.
The problem is, I manually tried different values to know where to stop to see the bones etc... And it might be different from one sample to another. Is there a way to make it automatic? May be it is something set inside the dicom files?