Nifti Images with SIRF #1281
-
Hello! I'm trying to reconstruct PET images in nifti format using the SIRF VM. Is this even possible? since in the examples provided, only the interfile hv and hs formats have been used. I also changed the nifti format to h33, i33, and v formats using the XMedcon application. image_data = pet.ImageData('path/to/file/m000-31013_AV451_S_E.v') renders this error: ERROR: Error opening file /media/sf_DATABASE/m000-m000-31013_AV451_S_E.v and that the reconstruction engine output may provide more information I get the same error message when using h33/i33 as well. If you could help in this matter, I would much appreciate it. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Hi @Kiarashdnsh sorry for late reply. You should pass a path to the interfile header file to the However, you want to load a NIFTI file, this should doable as: from sirf import Reg
from sirf import STIR as pet
data = Reg.ImageData('/path/to/data.nii')
petdata = pet.ImageData(data) |
Beta Was this translation helpful? Give feedback.
-
so far as I remember you were using SIRF 3.5 - have you tried version 3.8? |
Beta Was this translation helpful? Give feedback.
-
There's a few things here (all suggestoins only work if you compiled STIR with ITK):
|
Beta Was this translation helpful? Give feedback.
There's a few things here (all suggestoins only work if you compiled STIR with ITK):
"I'm trying to reconstruct PET images in nifti format using the SIRF VM. " The rest of the question is actually not related to that, as you're only asking about reading. The answer to your original question is "yes". Likely something like
The (better) alternative is to use
sirf.STIR
to write directly as Nifti, without going through our conversion. This would use theim.write_par
functionality. Hopefully, there's an example...The error you're getting about the conversion is still in 3.8 AFAIK. But you wouldn't need it: