[vtkusers] Major speed up (was Re: vtkImageViewer2 / vtkImageActor (was Re: Sample code using VTK and DICOM))

masabumi ishihara maty.ishihara at gmail.com
Mon Oct 6 04:20:16 EDT 2008


Hi Mathieu,

Thank you for your cooperation.
But, unfortunately, it failed.
Because the original code is as follows;

>  if ( size[0] > GL_MAX_TEXTURE_SIZE ||
>       size[1] > GL_MAX_TEXTURE_SIZE )
>    {
>    return 0;
>    }

According to the above code, if the size[0] or size[0] exceed
GL_MAX_TEXTURE_SIZE,
the gdcmviewer will be forced to stop.
But, the gdcmviewer haven't stoped with the large DICOM Data, yet.
Then, I have to conclude that the above code is not the cause of the
poor performance.

What do you think of it?

Thanks,

Maty

2008/10/5 Mathieu Malaterre <mathieu.malaterre at gmail.com>

> On Fri, Oct 3, 2008 at 11:52 AM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
> > 'lo
> >
> > On Fri, Oct 3, 2008 at 11:41 AM, masabumi ishihara
> > <maty.ishihara at gmail.com> wrote:
> >> Hi Mathieu,
> >>
> >> Thank you for your splendid opinion.
> >> This time, we compareed two viewers' preformances.
> >> Unfortunately, the results are as follows;
> >>
> >>                                                      CPU rate
> >> performance of moving
> >>   gdcmviewer with release mode          50~60%                slow
> >>   our prototype viewer                         50~60%              real
> time
> >>
> >>   DICOM Data : LittleEndianExplicit  15,000 KB
> >
> > hum... for a 2D slice ? This is not that small after all. Maybe you
> > are suffering from the non-power of two issue in OpenGL + texture.
> >
> > What is the size of the image (it is printed in the output of
> > gdcmviewer). Something like:
> >
> > ...
> >  Bounds:
> >    Xmin,Xmax: (0, 347.85)
> >    Ymin,Ymax: (424.05, 848.1)
> >    Zmin,Zmax: (0, 0)
> >  Compute Time: 0
> >  ScalarType: 5
> >  NumberOfScalarComponents: 1
> >  Spacing: (0.15, 0.15, 1)
> >  Origin: (0, 424.05, 0)
> >  Dimensions: (2320, 2828, 1)
> >  Increments: (0, 0, 0)
> >  Extent: (0, 2319, 0, 2827, 0, 0)
> > ...
> >
> >> Can you believe the above results?
> >> Do you have any reason, e.g. memory sled ..., ?
> >> Our prototype viewer is simple 2D viewer, which doesn't have any
> interface
> >> to VTK, ITK GDCM.
> >> Then, we would like to use the other viewer for the future.
> >> But, it have to be real time operative.
> >
> > Because this is not my area of knowledge, I'll have to ask other
> > people if there is anything to do to speed things up. Maybe some
> > OpenGL guru will answer...
>
> This is fixed in VTK CVS, backporting patch to VTK 5.2 do fix the
> issue also for me:
>
>
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Rendering/vtkOpenGLImageActor.cxx?r1=1.37&r2=1.38&view=patch
>
> thanks to Francois !
>
> --
> Mathieu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081006/d0ee0843/attachment.htm>


More information about the vtkusers mailing list