[vtkusers] vtk and lot of dicom series
Lic. José M. Rodriguez Bacallao
jmrbcu at gmail.com
Fri Nov 13 11:53:21 EST 2009
well, I haven't write any C++ code, just python and I don't thinks
language is a problem. What I mean is that when I try to read say: 500
dcm CT files with vtkGDCMImageReader it slown down not just my
application, the computer too, does't not matter if I do this in a
single or multi-threaded way. I am using kubuntu 9.04 and now I will
test it with ubuntu 9.10 as soon as I compile vtk and gdcm.
PS: I use a thread to read the files because of the user interface
responsiveness, is this wrong?
On 11/13/09, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> On Thu, Nov 12, 2009 at 10:22 PM, Lic. José M. Rodriguez Bacallao
> <jmrbcu at gmail.com> wrote:
>> hi folks, I am using vtk to display dicom image series. I am using
>> python and pyqt4 in linux. I have noticed that when I load for at
>> least 5 series of 200 MR images each one, my application get VERY
>> slow. I am using vtkGDCMImageReader and load every serie within a
>> vtkImageData for example this way:
>>
>> reader = vtkgdcm.vtkGDCMImageReader()
>> reader.SetFileNames(to_vtk_string_array(serie1))
>> reader.Update()
>>
>> I repeat this step in a thread for every serie and when it is loaded I
>> send a signal for display it with vtkImageViewer2 (could be an
>> vtkImageColorViewer from gdcm too)
>>
>> why is that, which is the recommended way to load and display a lot of
>> dicom image series?
>
> Send us the C++ code you wrote to actually be able to say that
> DICOM/GDCM was the bottleneck in your benchmark.
>
> Using thread to read files makes no sense in most situation.
>
> GDCM comes with some benchmark tools such as threadgdcm.cxx (build
> gdcm with examples:ON). Or use vtkGDCMThreadedImageReader.h /
> vtkGDCMThreadedImageReader2.h if you really think that your data
> server is doing striping and you think you can speed up reading using
> this fact.
>
> You really have to define your problem: the time to load the file from
> disk to memory cannot be compressed without hardware changes. The time
> to actually parse the DICOM file is extremely fast, run the benchmark
> multiple times to be convinced (GDCM does a lot of optimization for
> reading DICOM containing images). The only thing you can cheat with is
> disk caching. Check readahead on linux and FILE_FLAG_SEQUENTIAL on
> Win32.
>
> HTH
> --
> Mathieu
>
--
Lic. José M. Rodriguez Bacallao
Centro de Biofisica Medica
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------
More information about the vtkusers
mailing list