[vtk-developers] potential speedup for the vtkpolydatatoimagestencil

Mark Roden mmroden at gmail.com
Mon Feb 27 16:07:07 EST 2012


Hi David,

I know where the split in the code is.  My point is that the direct
path doesn't work with rtstructs, ie, the result of reading rtstructs
via the vtkGDCMPolyDataReader.  It only works if I run the extrusion
first.  In addition, I can't find other code that uses the direct
path, so I can't see how to fix the polydata (if it's, in fact,
broken) to use the direct path.

So how can I get the direct path to be chosen?  The output from the
reader is a set of lines, and only adds polys once we do the
extrusion.  Given that it still takes 10 seconds, _something_ is being
done there...

Thanks,
Mark

On Mon, Feb 27, 2012 at 12:58 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Mon, Feb 27, 2012 at 1:24 PM, Mark Roden <mmroden at gmail.com> wrote:
>
>> David, if you could please shed some light on how to use the faster code path-- right now, it produces blank binary images.
>
> See line 320 in the source code.  That's the "if" statement that
> chooses the cutter-path (if the input is polys) or the direct path (if
> the input is polyline contours that are aligned with the slices).
>
> http://vtk.org/gitweb?p=VTK.git;a=blob;f=Hybrid/vtkPolyDataToImageStencil.cxx;#l320
>
> If you want to be sure about what path your data is taking, you can
> add print statements to the code, or run your program in a debugger.
>
>  - David



More information about the vtk-developers mailing list