reading of PETSIRD list-mode function#1604
Conversation
…its from classes
…D listmode data classes.
…der and source files, as well as the use_hdf5 member variable, to match the original code. Also added the new cmakedefine for HAVE_PETSIRD_HDF5_PROTOCOLS in the STIRConfig.h.in file.
NikEfth
left a comment
There was a problem hiding this comment.
[x] there are some changes here for set_proj_data_info which probably came from another PR. Maybe they'll disappear when you merge master here
- Merged with master is fine now.
[ x] there are changes here to cope with even number of TOF bins. They might be good, but it doesn't have anything to do with PETSIRD.
- I know. But I had to make them as the data shared by people in the hackathon had even number of bins. If you you want to compare with that we need these changes here. I can document more.
[x] there's some changes in find_basic_vs_nums... which don't belong here
- Yes that code doesn't do anything atm.
[x] I see no reason to make InputFormat::can_read non-const. If this is really required for PETSIRD, please explain. We should then work around it.
- Done
[x] I guess the BinNormalisation isn't finished yet. I would suggest we currently call error and do it in a separate PR.
- No it is finished. Unless you have comments.
| - Mat3: std::array<std::array<float,3>,3> for compact fixed-size storage. | ||
| - Vec3: std::array<float,3> for simple 3D vectors. |
There was a problem hiding this comment.
OK. I started a bit of this. From the test_ . It won't be hard.
| class CListModeDataSAFIR : public CListModeDataBasedOnCoordinateMap | ||
| { | ||
| public: | ||
| /*! Constructor |
| else | ||
| { | ||
| bin.timing_pos_num() = -timing_pos_num; | ||
| bin.timing_pos_num() = -timing_pos_num - (get_num_tof_poss() % 2 == 0); |
There was a problem hiding this comment.
I am sorry, I don't understand. We need to make adjustments for even and odd number of bins.
| auto stir_scanner_sptr = petsird_info_sptr->get_scanner_sptr(); | ||
|
|
||
| int tof_mash_factor = 1; | ||
| this->set_proj_data_info_sptr(std::const_pointer_cast<const ProjDataInfo>( |
| // for (int timing_pos_num = proj_data_info.get_min_tof_pos_num(); timing_pos_num <= proj_data_info.get_max_tof_pos_num(); | ||
| // ++timing_pos_num) |
KrisThielemans
left a comment
There was a problem hiding this comment.
some other clean-up suggestions
| find_unique_values(std::set<elemT>& values, const Array<num_dim, elemT>& input) | ||
| { | ||
| for (int i = input.get_min_index(); i <= input.get_max_index(); ++i) | ||
| { | ||
| find_unique_values(values, input[i]); | ||
| } | ||
| } |
There was a problem hiding this comment.
This will fail, as input[i] is an num_dim-1 array. You probably wanted to iterate using begin_all(), but as it doesn't create trouble, it means this function isn't used, so you could cut it. If it is needed, the 1D and nD implementation could be the same.
CMakeLists.txt
Outdated
| # minimum C++ version required (you can still ask for a more recent one | ||
| # by setting CMAKE_CXX_STANDARD) | ||
| UseCXX(17) | ||
| UseCXX(20) |
There was a problem hiding this comment.
we can only do this for STIR 7.*. So I suggest we keep this here at 17, and make it 20 if we found PETSIRD (like what is done for ROOT)
There was a problem hiding this comment.
I did something similar, but maybe better.
Co-authored-by: Kris Thielemans <KrisThielemans@users.noreply.github.com>
|
Do you want the |
WIP