[vtkusers] Using vtkLassooStencilSource
David Gobbi
david.gobbi at gmail.com
Sat Nov 6 18:09:06 EDT 2010
Hi Alexis,
Thanks for trying this out. Your code for using the class is correct.
For the first message, the one vtkMultiThreader.cxx, does it give any
sort of error info?
The second error about memory allocation is a strange one, it is
complaining about allocating 1231041 bytes which is only about the
size of one video frame. Try using the Windows Task Manager to see
how your computer's memory use increases when you run your
application.
About Slicer, yes you generally should rebuild after updating VTK. To
be more specific, it is only certain changes to the VTK header files
that will make a rebuild necessary, but better safe than sorry.
David
On Sat, Nov 6, 2010 at 3:11 PM, Alexis Cheng <acheng_1221 at hotmail.com> wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list