diff --git a/documentation/release_6.3.htm b/documentation/release_6.3.htm index 43342331f..54a9c63bc 100644 --- a/documentation/release_6.3.htm +++ b/documentation/release_6.3.htm @@ -48,6 +48,11 @@

Known problems

What is new for developers (aside from what should be obvious from the above):

+

New functionality

+ +
  • + ProjDataInMemory read_from_file method now returns a ProjDataInMemory object. +
  • Changed functionality

    diff --git a/src/buildblock/ProjDataInMemory.cxx b/src/buildblock/ProjDataInMemory.cxx index 8ec0cfa3c..420c801df 100644 --- a/src/buildblock/ProjDataInMemory.cxx +++ b/src/buildblock/ProjDataInMemory.cxx @@ -350,6 +350,12 @@ ProjDataInMemory::ProjDataInMemory(const ProjDataInMemory& proj_data) std::copy(proj_data.begin_all(), proj_data.end_all(), this->begin_all()); } +shared_ptr +ProjDataInMemory::read_from_file(const std::string& filename) +{ + return std::make_shared(*ProjData::read_from_file(filename)); +} + float ProjDataInMemory::get_bin_value(Bin& bin) { diff --git a/src/include/stir/ProjDataInMemory.h b/src/include/stir/ProjDataInMemory.h index 0ded4e017..b101819b2 100644 --- a/src/include/stir/ProjDataInMemory.h +++ b/src/include/stir/ProjDataInMemory.h @@ -62,6 +62,9 @@ class ProjDataInMemory : public ProjData //! Copy constructor ProjDataInMemory(const ProjDataInMemory& proj_data); + //! A static member to get the projection data in memory from a file + static shared_ptr read_from_file(const std::string& filename); + Viewgram get_viewgram(const int view_num, const int segment_num, const bool make_num_tangential_poss_odd = false,