New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multipexing-hkem: allows the use of multiple "anatomical" images #424
Conversation
Daniel: add list-mode reconstruction by frame file definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice! Looks good to me, just one small indentation recommendation.
Actually, there are merge conflicts.
Recommend:
Recommend:
Not sure here... The
Recommend:
|
Not sure why the Appveyor failed, did it build locally? |
Also, this appears to solve #416, as the code looks like it would gracefully accept an empty list? |
not sure but it runs on my computer |
The build error is:
But strangely only occurs when building on Linux with Is this an issue with |
@KrisThielemans Pointers from |
if not DISABLE_CERN_ROOT enables cxx11: Lines 103 to 115 in 71c03a1
Perhaps it is a cxx version problem? |
Very likely so, I'd say. But this should be the same for Daniel building
locally. I'd say its also a compiler version thing then?
But it doesn't explain why a boost pointer is being used..
…On Mon, 2 Dec 2019 at 12:38, robbietuk ***@***.***> wrote:
if not DISABLE_CERN_ROOT enables cxx11:
https://github.com/UCL/STIR/blob/71c03a15b1823ad7af010f5a06afcab3131c9664/CMakeLists.txt#L103-L115
Perhaps it is a cxx version problem?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#424?email_source=notifications&email_token=AAGHNCKAUJC22ETQER6DVS3QWTXURA5CNFSM4JQAGLB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFTGR3A#issuecomment-560359660>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGHNCPOBIVTB3DRE6XU5IDQWTXURANCNFSM4JQAGLBQ>
.
|
What do you mean by this? STIR should be compatible with pre-C++11. So I think that the |
As @rijobro almost says, In any case, it's a pre-C++11 bug. you cannot have a Probably best is to work-around it like shared_ptr<TargetT> an_im_sptr(read_from_file<TargetT>(anatomical_image_filenames[i]));
this->anatomical_prior_sptr.push_back( an_im_sptr); and make |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this somehow backwards compatible for SIRF. SIRF 2.1 was released with STIR 4.0.0-alpha. If we change interface between 4.0.0-alpha and 4.0.0, it'll be somewhat confusing...
might be doable with overloading and default arguments of functions.
examples/samples/KOSMAPOSL_mhkem.par
Outdated
do symmetry 90degrees min phi := 1 | ||
do_symmetry_180degrees_min_phi:= 1 | ||
do_symmetry_swap_s:= 1 | ||
do_symmetry_swap_segment:= 1 | ||
do_symmetry_shift_z:= 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather not have these here. confusing for most people
examples/samples/KOSMAPOSL_mhkem.par
Outdated
|
||
input file := my_noisy_prompts_1ax_pos.hs | ||
|
||
; Daniel: here we have the possibility to choose the parameters which define the kernel matrix and the name of the MR image. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "Daniel" (I mean the string, not the person!)
void set_num_neighbours(const int); | ||
void set_num_non_zero_feat(const int); | ||
void set_sigma_m(const double); | ||
void set_sigma_m(double&, int &index); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please no references in arguments of a set
function
@@ -235,12 +235,12 @@ class KOSMAPOSLReconstruction: | |||
|
|||
/*! Create a matrix similarly to calculate_norm_matrix() but this is done for the anatomical image, */ | |||
/*! which does not change over iteration.*/ | |||
void calculate_norm_const_matrix(TargetT &normm, | |||
void calculate_norm_const_matrix(std::vector<shared_ptr<TargetT> > normm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this doesn't have any output apparently, but only side-effects? is that correct? best to document. Please make normm
a reference, const
if input`, non-const if output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes normm is the output, i forgot the reference
@@ -170,17 +171,14 @@ initialise_keymap() | |||
// this->parser.add_key("anatomical image filename",&this->anatomical_image_filenames); | |||
this->parser.add_key("number of neighbours",&this->num_neighbours); | |||
this->parser.add_key("number of non-zero feature elements",&this->num_non_zero_feat); | |||
this->parser.add_key("sigma_m",&this->sigma_m); | |||
this->parser.add_key("sigma_m",&sigma_m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not this->
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason, I probably forgot it
} | ||
|
||
template <typename TargetT> | ||
void | ||
KOSMAPOSLReconstruction<TargetT>:: | ||
set_anatomical_image_filenames(const std::string& arg) | ||
set_anatomical_image_filenames(std::string &arg, int index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
arg
is an input argument, need to have it const
@@ -196,7 +196,7 @@ class KOSMAPOSLReconstruction: | |||
//! Anatomical image filename | |||
std::vector<std::string> anatomical_image_filenames; | |||
|
|||
std::vector<shared_ptr<TargetT> > anatomical_prior_sptr,kmnorm_sptr; | |||
std::vector<std::shared_ptr<TargetT> > anatomical_prior_sptr,kmnorm_sptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no std::shared_ptr
please. it'll break. just shared_ptr
@danieldeidda is this for next year? I might try to get 4.0 beta out during the holidays... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danieldeidda is this for next year? I might try to get 4.0 beta out during the holidays...
Sorry I left it bit. This can be done in these days, I will review the comments and apply the modification. I remember we said something about the sigma_m being a vector now that can be an issue for SIRF
@@ -235,12 +235,12 @@ class KOSMAPOSLReconstruction: | |||
|
|||
/*! Create a matrix similarly to calculate_norm_matrix() but this is done for the anatomical image, */ | |||
/*! which does not change over iteration.*/ | |||
void calculate_norm_const_matrix(TargetT &normm, | |||
void calculate_norm_const_matrix(std::vector<shared_ptr<TargetT> > normm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes normm is the output, i forgot the reference
@@ -170,17 +171,14 @@ initialise_keymap() | |||
// this->parser.add_key("anatomical image filename",&this->anatomical_image_filenames); | |||
this->parser.add_key("number of neighbours",&this->num_neighbours); | |||
this->parser.add_key("number of non-zero feature elements",&this->num_non_zero_feat); | |||
this->parser.add_key("sigma_m",&this->sigma_m); | |||
this->parser.add_key("sigma_m",&sigma_m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no reason, I probably forgot it
if (this->anatomical_image_filenames.size()>1){ | ||
error("At the moment you can only use one anatomical image %s"); | ||
if (!this->anatomical_image_filenames.size()==sigma_m.size()){ | ||
error("The number of sigma_m parameters must be the same as the numberof anatomical image filenames %s"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably best not to put any argument
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
travis etc are all happy so this is great. I have a few tiny ones left. Please check if SIRF 2.1 compiles/runs with this version as wel (it probably does)l. Then good to go.
SIRF compiles with the last commit |
thanks @danieldeidda by the way, |
Ops! :)
…________________________________
From: Kris Thielemans <notifications@github.com>
Sent: Tuesday, January 14, 2020 10:52:26 AM
To: UCL/STIR <STIR@noreply.github.com>
Cc: Daniel Deidda <daniel.deidda@npl.co.uk>; Mention <mention@noreply.github.com>
Subject: [EXTERNAL] Re: [UCL/STIR] Multipexing-hkem: allows the use of multiple "anatomical" images (#424)
CAUTION: This email originated from outside of NPL. Do not click links or open attachments unless you recognize the sender and know the content is safe.
thanks @danieldeidda<https://github.com/danieldeidda>
by the way, ci skip needs to be [ci skip] for it to prevent CI running...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#424?email_source=notifications&email_token=AECUSJPSOSO4TXRFIQTEUDLQ5WKOVA5CNFSM4JQAGLB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI4FLFQ#issuecomment-574117270>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AECUSJKKX46SSKRPKTHB3G3Q5WKOVANCNFSM4JQAGLBQ>.
Visit the NPL website<https://www.npl.co.uk/> and find out how our cutting-edge measurement science has a positive impact in the real world.
________________________________
[http://resource.npl.co.uk/images/npl-logo.jpg]<http://www.npl.co.uk/?utm_source=Email%20Footer&utm_medium=email&utm_campaign=Homepage> Keep in touch<http://www.npl.co.uk/contact> [http://resource.npl.co.uk/images/twitter.jpg] <http://www.twitter.com/npl> [http://resource.npl.co.uk/images/facebook.jpg] <http://www.facebook.com/npldigital> [http://resource.npl.co.uk/images/youtube.jpg] <http://www.youtube.com/npldigital>
________________________________
NPL Privacy Policy<http://www.npl.co.uk/privacy-policy/>
If you have received this message in error, please notify us and remove it from your system.
NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.
NPL Management Ltd is a company registered in England and Wales, number: 2937881
Registered office: National Physical Laboratory | Hampton Road | Teddington, Middlesex | UK | TW11 0LW
|
This needs to be merged before the "only_functional" pull request! @ashgillman