[vtkusers] vtkImageDataGeometryFilter problem

Kim Rosenbohm kim.rosenbohm at posteo.de
Tue Aug 5 08:28:37 EDT 2014


 Hi All.

Though nobody responded to my previous question, I'll try
again with a different problem:
I have a pipeline for masking out areas
in a 2D image and turning the image data into a 3D surface:

 ...

vtkSmartPointer< vtkImageResample > m_surfaceResampled;

vtkSmartPointer< vtkImageResample > m_maskResampled;
 vtkSmartPointer<
vtkImageMask > m_maskMask;
 vtkSmartPointer< vtkImageDataGeometryFilter
> m_surfaceGeoFilter;
 vtkSmartPointer< vtkWarpScalar >
m_surfaceWarpFilter;

 //use a vtkImageMask to remove masked-out stuff
from an image
 m_maskMask->SetInputConnection(0,
m_surfaceResampled->GetOutputPort());
 m_maskMask->SetInputConnection(1,
m_maskResampled->GetOutputPort());

m_maskMask->SetMaskedOutputValue(-10000);

//m_maskMask->SetMaskAlpha(0.0);
 //setup filter creating geometry from
image/height data

m_surfaceGeoFilter->SetInputConnection(m_maskMask->GetOutputPort());

//setup masking out of cells marked in mask

m_surfaceGeoFilter->ThresholdCellsOn();

m_surfaceGeoFilter->SetThresholdValue(*m_maskMask->GetMaskedOutputValue());

m_surfaceGeoFilter->ThresholdValueOn();
 //pass geometry to scale
surface z-axis height

m_surfaceWarpFilter->SetInputConnection(m_surfaceGeoFilter->GetOutputPort());

m_surfaceWarpFilter->SetScaleFactor(1.0);
 ...

This works ok for
positive values in m_surfaceResampled, but not if I only have negative
values there.
Then I get no surface at all... Why?
Additionally an
eleborate explanation of what ThresholdCELLS and ThresholdVALUE do
and
how they interact would be nice. The documentation is not dummy-proof
enough for me there...

Best Regards,

Kim 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140805/da0083f5/attachment.html>


More information about the vtkusers mailing list