[vtkusers] Re: vtkConnectivityFilter --> source code
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Mon Nov 15 11:30:08 EST 2004
Hi Michnay,
> //This always returns 1:
> AfxMessageBox(pDoc->m_connectivity->GetExtractionModeAsString());
This should return a string "ExtractAllRegions" not 1. Try:
AfxMessageBox(pDoc->m_connectivity->GetNumberOfExtractedRegions());
If you are using vtkImageThreshold first, why not use it to "select" the
mask. See how its done here:
http://www.crd.ge.com/~lorensen/seg12/scripts/segmented16.tcl
Something like:
vtkImageThreshold selectTissue
selectTissue ThresholdBetween $TISSUE $TISSUE
selectTissue SetInValue 255
selectTissue SetOutValue 0
selectTissue SetInput [$lastConnection GetOutput]
and then contour at a value of 127.5
hth
Goodwin
More information about the vtkusers
mailing list