Skip to content

Commit

Permalink
[ci skip] Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
robbietuk committed Feb 15, 2024
1 parent 070c06a commit 1bb2af0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 4 additions & 2 deletions documentation/release_6.1.htm
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ <H2>What's new for developers (aside from what should be obvious

<h3>Backward incompatibities</h3>
<ul>
<li>
</li>
<li>
Additional checks on <code>GeometryBlocksOnCylindrical</code> scanner configuration, which may lead to an
error being raised, while previously the code silently proceeded.
</li>
</ul>

<h3>New functionality</h3>
Expand Down
15 changes: 7 additions & 8 deletions src/buildblock/Scanner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1754,20 +1754,19 @@ Scanner::check_consistency() const
{ //! Check consistency of axial and transaxial spacing for block geometry
if (get_num_axial_buckets() != 1)
{
warning(boost::format("BlocksOnCylindrical num_axial_buckets (%d) is greater than 1. This is not supported yet."
warning(boost::format("BlocksOnCylindrical num_axial_buckets (%d) is greater than 1. This is not supported yet. "
"Consider multiplying the number of axial_blocks_per_bucket by %d.")
% get_num_axial_buckets() % get_num_axial_buckets());
return Succeeded::no;
}
{ // Ensure the number of axial crystals per bucket is a multiple of the number of rings
// This asserts the number of axial
{ // Assert that each block contains an equal number of axial crystals
if (get_num_rings() % get_num_axial_crystals_per_bucket() != 0)
{
error(boost::format("Error in GeometryBlocksOnCylindrical: number of rings (%d) is not a multiple of the "
"get_num_axial_crystals_per_bucket "
"(%d) = num_axial_crystals_per_block (%d) * num_axial_blocks_per_bucket (%d)")
% get_num_rings() % get_num_axial_crystals_per_bucket() % get_num_axial_crystals_per_block()
% get_num_axial_blocks_per_bucket());
warning(boost::format("Error in GeometryBlocksOnCylindrical: number of rings (%d) is not a multiple of the "
"get_num_axial_crystals_per_bucket "
"(%d) = num_axial_crystals_per_block (%d) * num_axial_blocks_per_bucket (%d)")
% get_num_rings() % get_num_axial_crystals_per_bucket() % get_num_axial_crystals_per_block()
% get_num_axial_blocks_per_bucket());
}
}
if (get_axial_crystal_spacing() * get_num_axial_crystals_per_block() > get_axial_block_spacing())
Expand Down
2 changes: 0 additions & 2 deletions src/include/stir/GeometryBlocksOnCylindrical.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

/*
Copyright 2017 ETH Zurich, Institute of Particle Physics and Astrophysics
Copyright (C) 2024, Prescient Imaging
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -23,7 +22,6 @@ limitations under the License.
\brief Declaration of class stir::GeometryBlocksOnCylindrical
\author Parisa Khateri
\author Robert Twyman
*/
#ifndef __stir_GeometryBlocksOnCylindrical_H__
Expand Down
2 changes: 1 addition & 1 deletion src/recon_test/test_blocks_on_cylindrical_projectors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ BlocksTests::run_back_projection_test_with_axial_buckets(BackProjectorByBin& bac
scanner_sptr->set_transaxial_block_spacing(scanner_sptr->get_transaxial_crystal_spacing()
* scanner_sptr->get_num_transaxial_crystals_per_block());
scanner_sptr->set_num_axial_blocks_per_bucket(2);
scanner_sptr->set_num_rings(scanner_sptr->get_num_axial_blocks_per_bucket() * num_buckets);
scanner_sptr->set_num_rings(scanner_sptr->get_num_axial_crystals_per_bucket() * num_buckets);
scanner_sptr->set_scanner_geometry("BlocksOnCylindrical");
scanner_sptr->set_up();
}
Expand Down

0 comments on commit 1bb2af0

Please sign in to comment.