SyneRBI / SIRF

Main repository for the CCP SynerBI software
http://www.ccpsynerbi.ac.uk
Other
58 stars 29 forks source link

mSTIR.ImageData() - Multicomponent images only return first component #205

Open rijobro opened 6 years ago

rijobro commented 6 years ago

For multicomponent images, such as parametric or dynamic images, mSTIR.ImageData("filename") will only open their first component.

Would it be possible to change the implementation to mSTIR.ImageData("filename", component=1), and return the desired component?

KrisThielemans commented 6 years ago

mSTIR.ImageData("filename") will only open their first component. this happens to be due to how the Interfile reader works (probably also true for ECAT7 images)

component=1 would be a cludge that isn't compatible with MR, so I down-vote this.

To read a single component would need serious changes on the SIRF or STIR side (using a STIR "multi" object, and then getting the desired one). I think it'd be better to think about what would be needed to get SIRF to use stir::DynamicDiscretisedDensity (and then presumably also DynamicProjData. It would then be a bit closer to the MR side. Unfortunately it probably needs a fair amount of work as the STIR reconstructors currently take "static" images and data as input. That would need some extra STIR stuff to make this transparent to SIRF (mostly easy, but IO will be hard), or loops on the SIRF side.

This will probably not a project on STIR and SIRF...

Related is #90.