[vtkusers] vtkResliceImageViewer::SetInputData() slow when executed after vtkDICOMImageReader::Update()
ochampao
ochampao at hotmail.com
Fri Feb 9 12:44:19 EST 2018
Hi Sankhesh, thanks for the reply.
Please note that I am not doing both in my function i.e. I tried either the
code:
// loads whole dicom series in 2 seconds
data = reader->GetOutput();
resliceImageViewer1->SetInputData(data);
resliceImageViewer2->SetInputData(data);
resliceImageViewer3->SetInputData(data);
reader->Update();
// ---------------------------------------------
-OR-
// Loads whole dicom series in ~22 seconds
data = reader->GetOutput();
reader->Update();
resliceImageViewer1->SetInputData(data);
resliceImageViewer2->SetInputData(data);
resliceImageViewer3->SetInputData(data);
// ---------------------------------------------
>> As for slowness you see, could you please provide details on the data
>> type and size and how much time is spent in SetInputData? <<
I am loading a CT image volume from a DICOM series (743 slices, ~400MB). If
I place the SetInputData() calls before Update() the whole function
addImage() completes in about 2seconds, whereas if I place SetInputData()
after Update(), the whole function takes ~22seconds.
When stepping through the code in the slow case, I have noticed that
execution spends about 2seconds on Update(), ~18seconds on the first
SetInputData() and then about 2 seconds on the rest of the code in the
function. So it's the first call to SetInputData() that is slowing down the
execution.
I have also tried the following sequence that calls Update() before
GetOutput(), but it is still equally slow (~22seconds) which I find
counter-intuitive.
// reader->GetOutput() has the data now... Still takes about 22 seconds
reader->Update();
data = reader->GetOutput();
resliceImageViewer1->SetInputData(data);
resliceImageViewer2->SetInputData(data);
resliceImageViewer3->SetInputData(data);
// ---------------------------------------------
Any suggestions as to why this is happening?
Thanks,
Panos
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
More information about the vtkusers
mailing list