Operating system: Mac
Slicer version: 4.6.2
Hi everyone !
I’m currently working on my loadable module and I would need to get the real spacing of a DICOM serie using vtkImageData. I explain:
the user loads a DICOM serie (using DICOM module) and selects the corresponding node in my module,
then I do:
vtkMRMLScalarVolumeNode* volumeNode = vtkMRMLScalarVolumeNode::SafeDownCast(d->volumeSelector->currentNode());
vtkImageData* image = volumeNode->GetImageData();
double spacing[3];
image->GetSpacing(spacing);
And I get spacing=[1,1,1]
But, when the DICOM serie is loaded, I can see in the “Volumes” module that the spacing is different (something like [1.5 1.5 4]
).
How can I get the real spacing of the DICOM serie in my code (and not [1 1 1]
) ?
Thank you for your help,
Regards,
Sandra.