Dicom images and progress rendering

Hello everyone,

I work with DICOM series. Each series contain around 500 slices. I use the great module vtk-dicom to do all the reading part.

During reading of those slices, is it possible to display the slice read?

Actually, I put an observer to the reader on the ProgressEvent to display the progression but not the images.

I don’t find any example and didn’t find anything in the documentation.

Is it possible?

Thank you

1 Like

In vtk-dicom v0.8.9, you can call reader->GetProgressText() in your observer to get the name of file that is currently being read.

Thank you for your answer.

I think I didn’t expose my problem quite well.

For example, I have a series of 500 Dicom files. During the reading, I suppose that not all dicom are loaded at the same time.
Is it possible during the reading phase to display the image loaded (not the image file) file after file?

The quick answer is no, because the buffer that vtkDICOMReader reads the individual files into is not accessible through its API.

A longer answer is that the reading of images is centralized in a single internal virtual method, appropriately called ReadOneFile(), so you could write a subclass that overrides this method and does what you need. For example, you could add another output to vtkDICOMReader that is big enough for just one image, and you could modify ReadOneFile() so that it copies the most recently read file into that output.

Ok great. Thank you so much for your answer and explanations.
I will try to subclass vtkDICOMReader then give you a feedback on it.