[vtkusers] Bug in vtkImageReslice ... (VTK 5.0)
Vincent Nicolas
vincent.nicolas at tele.ucl.ac.be
Wed Feb 8 10:08:12 EST 2006
Hi all,
While upgrading my code to VTK 5.0 (the version released on the website), I've found what seems to be a bug in vtkImageReslice. I'm applying transformation on an Image using vtkImageReslice, and then extracting a contour, using vtkMarchingSquares (on 1 slice), which is transformed before visualized. This pipe were working fine with VTK 4.4, but no more with VTK 5.0. No contour is created by the contour filter. Although, the output of vtkImageReslice can be visualized, and seems to be correct (origin, size, pixels, ...). No error is reported in the console during the execution.
I also tried using a vtkExtractVOI filter to extract only one slice, but the save problem happends.
I've the same behaviour on Windows and Linux.
Here is the code that was working on 4.0 and not on 5.0 (without any modifications) :
vtkImageReslice* reslice = vtkImageReslice::New();
reslice->SetInput(reader->GetOutput());
// reslice->UpdateWholeExtent(); no effect on this bug
this->contour = vtkMarchingSquares::New();
this->contour->SetInput(reslice->GetOutput());
this->contour->SetImageRange(dim[0],dim[1],dim[2],dim[3],z,z);
this->contour->SetValue(0,300);
this->contour->Update();
this->vtkTrans = vtkTransform::New();
this->vtkTrans->Identity();
this->vtkTransFilter = vtkTransformPolyDataFilter::New();
this->vtkTransFilter->SetTransform(this->vtkTrans);
this->vtkTransFilter->SetInput(this->contour->GetOutput());
this->mapper = vtkPolyDataMapper2D::New();
this->mapper->ScalarVisibilityOff();
this->actor = vtkActor2D::New();
Does anyone has an idea where the bug is or how to resolve it ?
Thanks,
Vincent NICOLAS
-----------------------------------------
Communications and Remote Sensing Lab.
Universite catholique de Louvain
vincent.nicolas at tele.ucl.ac.be
+32 (0)10 478555
http://www.tele.ucl.ac.be
More information about the vtkusers
mailing list