Skip to content

Nifti Images with SIRF #1281

Answered by KrisThielemans
Kiarashdnsh asked this question in Q&A
Discussion options

You must be logged in to vote

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

     im = recon.get_output()
     regim = reg.ImageData(im)
     regim.write('bla.nii')

    The (better) alternative is to use sirf.STIR to write directly as Nifti, without going through our conversion. This would use the im.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:

    im = pet.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@Kiarashdnsh
Comment options

Comment options

You must be logged in to vote
3 replies
@Kiarashdnsh
Comment options

@KrisThielemans
Comment options

@Kiarashdnsh
Comment options

Comment options

You must be logged in to vote
2 replies
@danieldeidda
Comment options

@Kiarashdnsh
Comment options

Answer selected by Kiarashdnsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants