[vtkusers] Spacing lost in vtkImageAppend
Georg Ziegler
gziegler at mail.tuwien.ac.at
Thu Jul 15 08:10:39 EDT 2010
Hello!
I have a problem with the following code snippet.
The first output yields the correct spacing for each image. (Which is
not equal to 1,1,1)
The spacing of the output of vtkImageAppend is reset to the default
spacing of (1,1,1).
Is that a feature or a bug? Am I not using vtkImageAppend in the right way?
for (unsigned long i = 0; i < this->GetSizeZ();i++)
{
this->GetMeasurementPlaneAt(i)->Update();
std::cout<<"pre appender"<<
this->GetMeasurementPlaneAt(i)->GetOutput()->GetSpacing()[0] <<
std::endl;
this->appender->AddInputConnection(0,
this->GetMeasurementPlaneAt(i)->GetOutputPort());
}
this->appender->Update();
std::cout<<"post appender
"<<appender->GetOutput()->GetSpacing()[0]<<std::endl;
It says in the documentation
http://www.vtk.org/doc/nightly/html/classvtkImageAppend.html
(http://www.vtk.org/doc/release/5.6/html/a00823.html)
that origin and spacing of the first input are used. Obviously this is
not the case here.
I'm using vtk 5.6.
Regards,
Georg
More information about the vtkusers
mailing list