[CCPPETMR/SIRF] Add getter for number of total voxels to NiftiImageData (#301)

0 views
Skip to first unread message

Johannes Mayer

unread,
Feb 5, 2019, 3:33:37 AM2/5/19
to CCPPETMR/SIRF, Subscribed

This function is useful to loop over the elements.


You can view, comment on, or merge this pull request online at:

  https://github.com/CCPPETMR/SIRF/pull/301

Commit Summary

  • Add getter for number of total voxels to NiftiImageData

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Richard Brown

unread,
Feb 5, 2019, 5:09:57 AM2/5/19
to CCPPETMR/SIRF, Subscribed

Merged #301 into master.

Richard Brown

unread,
Feb 5, 2019, 5:12:15 AM2/5/19
to CCPPETMR/SIRF, Subscribed

Merged. Just for interest, I was using get_raw_nifti_sptr()->nvox before.

Kris Thielemans

unread,
Feb 5, 2019, 5:12:36 AM2/5/19
to CCPPETMR/SIRF, Subscribed

can I ask how you're using this?

If we need it, we should have a virtual function higher up (which could just get it from the geo_info)

Richard Brown

unread,
Feb 5, 2019, 5:20:54 AM2/5/19
to CCPPETMR/SIRF, Subscribed

Apologies for merging, do you want me to revert?

Although we should be using geom_info, I don't fully trust it quite yet (e.g., varying slice distances for MR images). Should we make this an issue to solve in the future?

Johannes Mayer

unread,
Feb 5, 2019, 5:22:06 AM2/5/19
to CCPPETMR/SIRF, Subscribed

I decided to load the segmentation input of my simulation into a 'NiftiImageData3D' (no modality attached, just geometry and image information).

At some points I want to loop over all the pixels in the image and assign them to a specific tissue type.
I didn't see the functionality which Richard just suggested, so my code became very messy.

Don't think personally I will use it very often on top of that.

Reply all
Reply to author
Forward
0 new messages