Re: [SyneRBI/SIRF] [FIX] Constructing STIR Image from Acq Data with nx, ny should use Acq data (#231)

2 views
Skip to first unread message

Evgueni Ovtchinnikov

unread,
Feb 26, 2025, 8:16:36 AM2/26/25
to SyneRBI/SIRF, Subscribed

@ashgillman thanks a lot for your work on this - any chance you could find time to finish it please?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/c2684930926@github.com>

evgueni-ovtchinnikovevgueni-ovtchinnikov left a comment (SyneRBI/SIRF#231)

@ashgillman thanks a lot for your work on this - any chance you could find time to finish it please?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/c2684930926@github.com>

Edoardo Pasca

unread,
Jun 3, 2025, 9:42:54 AM6/3/25
to SyneRBI/SIRF, Subscribed

@paskino commented on this pull request.


In src/xSTIR/cSTIR/include/sirf/cSTIR/stir_data_containers.h:

> @@ -593,6 +593,24 @@ namespace sirf {
 			_data.reset(new Voxels3DF(*ad.get_proj_data_info_sptr()));
             this->set_up_geom_info();
 		}
+		STIRImageData
+		(const PETAcquisitionData& ad, const int nx, const int ny, const float zoom=1.F)
+		//! construct image with appropriate sizes for the given PETAcquisitionData
+		/*!
+			The number of z-planes is automatically determined in the STIR
+			implementation (see STIR documentation for VoxelsOnCartesianGrid),
+			but x and y size can be chosen. Voxel sizing is default_bin_size/zoom
+			(again, see STIR documentation for default_bin_size).
+		*/
+		{
+			const Coord3DF origin(0, 0, 0);
+			const Coord3DI sizes(-1, ny, nx);

Does that -1 make sense @KrisThielemans ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/review/2892448616@github.com>

Kris Thielemans

unread,
Jun 3, 2025, 10:13:22 AM6/3/25
to SyneRBI/SIRF, Subscribed

@KrisThielemans commented on this pull request.


In src/xSTIR/cSTIR/include/sirf/cSTIR/stir_data_containers.h:

> @@ -593,6 +593,24 @@ namespace sirf {
 			_data.reset(new Voxels3DF(*ad.get_proj_data_info_sptr()));
             this->set_up_geom_info();
 		}
+		STIRImageData
+		(const PETAcquisitionData& ad, const int nx, const int ny, const float zoom=1.F)
+		//! construct image with appropriate sizes for the given PETAcquisitionData
+		/*!
+			The number of z-planes is automatically determined in the STIR
+			implementation (see STIR documentation for VoxelsOnCartesianGrid),
+			but x and y size can be chosen. Voxel sizing is default_bin_size/zoom
+			(again, see STIR documentation for default_bin_size).
+		*/
+		{
+			const Coord3DF origin(0, 0, 0);
+			const Coord3DI sizes(-1, ny, nx);

yes, it selects the default number of slices. See https://github.com/UCL/STIR/blob/bfb4f82a4589dc8f77975ae44880094abd3d9640/src/include/stir/VoxelsOnCartesianGrid.h#L82-L87


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/review/2892608294@github.com>

Edoardo Pasca

unread,
Feb 5, 2026, 5:53:04 AMFeb 5
to SyneRBI/SIRF, Subscribed

Closed #231.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/issue_event/22554949449@github.com>

Edoardo Pasca

unread,
Feb 5, 2026, 5:53:06 AMFeb 5
to SyneRBI/SIRF, Subscribed
paskino left a comment (SyneRBI/SIRF#231)

Closing as the functionality has been merged via


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <SyneRBI/SIRF/pull/231/c3852769009@github.com>

Reply all
Reply to author
Forward
0 new messages