[vtkusers] vtkImageNonMaximumSuppression under vtk3.2

Asad A. Abu-Tarif tarifa at rpi.edu
Thu Dec 6 19:14:25 EST 2001


Hi,
I have the following piece of code that was working just fine under vtk3.12.
However, when I run it on the same machine but with vtk3.2 I keep getting
the error:
===============================
vtkImageNonMaximumSuppression:
The input ScalarType:3 must match the output scalar type:3
===============================

I checked the other input and it turned out that it has a scalar type of 10
(VTK_FLOAT). Could anyone help??

Also, is there any description of the changes between vtk3.2 and vtk3.12?

Thanks,
Asad

====================The Code=======================
vtkImageGradient *gradient=vtkImageGradient::New();
 gradient->SetInput(this->m_RawData);
 gradient->SetDimensionality(3);

 vtkImageGradientMagnitude
*gradientmagnitude=vtkImageGradientMagnitude::New();
 gradientmagnitude->SetInput(this->m_RawData);
 gradientmagnitude->SetDimensionality(3);

 vtkImageNonMaximumSuppression
*nonmaximumsuppression=vtkImageNonMaximumSuppression::New();
 nonmaximumsuppression->SetVectorInput(gradient->GetOutput());
 nonmaximumsuppression->SetMagnitudeInput(gradientmagnitude->GetOutput());
 nonmaximumsuppression->SetDimensionality(3);

 vtkImageThreshold *imagethreshold=vtkImageThreshold::New();
 imagethreshold->SetInput(nonmaximumsuppression->GetOutput());
 imagethreshold->SetInValue(0.0);
 imagethreshold->SetOutValue(1.0);
 imagethreshold->ThresholdByLower(this->m_Threshold);
 imagethreshold->Update();
=====================End============================




More information about the vtkusers mailing list