[vtkusers] Changing scalar type in vtkStructuredPoints
    Adam D. Burry 
    aburry at igotechnologies.com
       
    Thu Dec 13 15:37:37 EST 2001
    
    
  
Hi:
> I want to convert the scalar type in my vtkStructuredPoints data set to
> VTK_UNSIGNED_CHAR.
> 
> My pipeline looks something like this:
> 
> vtkActor                              // something to render on the
> screen
>     vtkTexture                        // use the slice as a texture
>         vtkExtractVOI                 // pull out a slice
            vtkImageMapToColors         // convert to VTK_UNSIGNED_CHAR
>             vtkImageConstantPad       // make volume a power of 2
>                 vtkVolumeReader       // read the slices from disk
>     vtkMapper                         // mapper to do mapper stuff
>         vtkPlaneSource                // plane to position texture
> 
> In addition to this pipeline, I have the LookupTable I want to use.
Ok. I found the vtkImageMapToColors filter. It does what I wanted.
However, it is still slow. Now the time is spent in
vtkDataSetAttributes::CopyTuple() which is called from
vtkDataSetAttributes::CopyData() which is called from
vtkExtractVOI::Execute().
Can anyone suggest a way to deal with this problem, or have I done as
much sensible optimization of the pipeline as I can?
One obvious thing of course is to sub-sample the volume so I copy less
data. I was thinking more along the lines of more pre-processing that
would avoid the copy altogether, perhaps by using the data in place.
Thanks.
Adam
--
Mr. Adam D. Burry, Software Developer
aburry at igotechnologies.com
    
    
More information about the vtkusers
mailing list