[vtkusers] Possible bug in vtkImageMask class ???

Michnay Balázs michnay at freemail.hu
Wed Sep 21 10:46:03 EDT 2005


Hi,
I have a very simple program that applies a mask to an image.
The code worked with VTK 4.2 but does not work with 4.4, however, 
the program compiles correctly but the program sometimes freezes and 
sometimes returns the following error message:

"ERROR: In D:\Softwares\VTK-4.4\VTK-
Source\Imaging\vtkImageMask.cxx, line 250
vtkImageMask (01A2D238): Maks can have one comenent"

I think this might be a bug. Or if it's not, what is the problem?

My code is:
----------------------------------------------------------
vtkBMPReader *imgOrigReader = vtkBMPReader::New();
imgOrigReader->SetFileName(pathToOrigImg.c_str());
//imgOrigReader->Update();

vtkBMPReader *imgThreshReader = vtkBMPReader::New();
imgThreshReader->SetFileName(pathToThreshImg.c_str());
//imgThreshReader->Update();

vtkImageMask *masked = vtkImageMask::New();
masked->SetImageInput(imgOrigReader->GetOutput());
masked->SetMaskInput(imgThreshReader->GetOutput());
//masked->NotMaskOn();
masked->SetMaskedOutputValue(255.0);
masked->Update();
----------------------------------------------------------

Thanks,

  Michnay

____________________________________________________________________________
Ingyenes hirdetés feladás az [origo] aprón!  Már több mint 180.000 ajánlat!
http://apro.origo.hu/



More information about the vtkusers mailing list