[vtkusers] Contour generation based on binary images
wydesenej
wydesenej at gmail.com
Fri Nov 9 08:59:20 EST 2012
Hi.
I have very specific image to describe structures in other image.
Scalar value of each pixel consits of N-bits.
Each bit represents some structure in image.
Some examples:
Pixel value = 11010000 -> means that this pixel is in stuctures 1, 2 and 4
Pixel value = 01010000 -> means that this pixel is in stuctures 2 and 4
Pixel value = 00001000 -> means that this pixel is in stucture 5
Pixel value = 00000000 -> means that this pixel is not in any structure
etc..
Now I need to find contours of these structures.
I need to use vtkContourFilter or vtkMarchingContourFilter.
Problem is that these filters uses as input scalar value for contour but i
want to set "mask value".
Example what i need:
vtkContourFilter filter;
filter->SetInput( mySpecialBinaryImage );
filter->SetValueMask( 00100000 ); -> This function is not presented in
filter. I want that this means: contour for me structure num3 ie. contour
pixels with bit3 == 1.
filter->Update();
filter->GetOutput(); -> There i get my countour. (if image is 2d i got
polygon if 3d i got surface...)
Please any ideas how to do this stuff?
--
View this message in context: http://vtk.1045678.n5.nabble.com/Contour-generation-based-on-binary-images-tp5717057.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list