[vtkusers] Using vtkLassooStencilSource

Alexis Cheng acheng_1221 at hotmail.com
Sat Nov 6 17:11:54 EDT 2010





Hi David,

I can certainly provide an informal review of vtkLassooStencilSource and vtkROIStencilSource, but first, I'm receiving an odd error during runtime.

I'm using vtkLassooStencilSource and generating the stencil like this:

        vtkSmartPointer<vtkLassooStencilSource> LassooStencil = vtkSmartPointer<vtkLassooStencilSource>::New();
        LassooStencil->SetPoints(points);
        LassooStencil->SetInformationInput(MTImage);

        vtkSmartPointer<vtkImageBlend> blend1 = vtkSmartPointer<vtkImageBlend>::New();
        blend1->SetStencil(LassooStencil->GetOutput());
        blend1->AddInput(MTImage);
        blend1->AddInput(BlackImage);

I'm interfacing with 3D Slicer and can see the stencil within my image. It's also running many times faster than when I generated the stencil using vtkImplicitFunctionToStencilData. However, after several minutes, a vtkOutputWindow pops up indicating:

ERROR: In ..\..\VTK\Common\vtkMultiThreader.cxx, line 285
vtkMultiThreader [605C96A0]

The above message is repeated a number of times before ending with:

ERROR: In c:\sliver3-lib\vtk\common\vtkDataArrayTemplate.txx, line 142
vtkUnsignedCharArray [605D3490]: Unable to allocate 1231041 elements of (The rest of the message is out of view of the window)

This did not occur with vtkImplicitFunctionToStencilData. Do you have any idea if this error is related to these new classes? Also, do I have to rebuild Slicer every time I modify the VTK package?

Thanks,
Alexis Cheng
Electrical Engineering
University of British Columbia
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101106/9ee6461c/attachment.htm>


More information about the vtkusers mailing list