Skip to content
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

Proposal: user-friendly fix for setting the random seed for registration #596

Closed
stnava opened this issue Jun 1, 2018 · 9 comments
Closed
Labels
enhancement Enhancements under development - feel free to join discussion if you'd like to contribute

Comments

@stnava
Copy link
Member

stnava commented Jun 1, 2018

@yarikoptic made a good suggestion that we should use an environment variable to set the random seed for registration in ANTs. e.g.

export ANTS_GLOBAL_DEFAULT_REGISTRATION_SEED=1

this would obviate user-interface code and would allow near immediate porting to ANTsR and ANTsPy.

@cookpa --- any chance you could to take a stab at implementation via pull request? i imagine that there are relatively few places (antsAI, antsMotionCorr, antsRegistration that would need a (pseudo-code)

registration->reinitializeSeed( std::getenv( " Name Here " ) )

or whatever the right ITK way is to do such a thing.

@stnava stnava added the enhancement Enhancements under development - feel free to join discussion if you'd like to contribute label Jun 1, 2018
@stnava
Copy link
Member Author

stnava commented Jun 1, 2018

@ntustison any thoughts on this?

@ntustison
Copy link
Member

Yeah, I think it's a good idea. I'm not sure about the environmental variable, though. We had a similar issue with Atropos and added a command line option. As another possibility to mitigating this randomization issue, could we add a command line parameter to these other programs? Not sure which route would be best but it would probably be worth considering standardizing one approach.

@satra
Copy link
Collaborator

satra commented Jun 1, 2018

my preference would be for a command line option.

@cookpa
Copy link
Member

cookpa commented Jun 1, 2018 via email

@stnava
Copy link
Member Author

stnava commented Jun 1, 2018 via email

@stnava
Copy link
Member Author

stnava commented Jun 2, 2018

#597 allows envt variable control of seed and can be over-ridden by a command line option when it becomes available.

@cookpa
Copy link
Member

cookpa commented Jun 8, 2018

I made a start with a command line option to antsRegistration:

792d673

FYI SyN does call the PrepareRegistration method, so it would not get a fixed seed in the current master. This only matters if you are not using dense sampling for SyN though.

I will work on other executables / scripts next.

@stnava
Copy link
Member Author

stnava commented Jun 9, 2018 via email

@cookpa
Copy link
Member

cookpa commented Jun 12, 2018

#599

@stnava stnava closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancements under development - feel free to join discussion if you'd like to contribute
Projects
None yet
Development

No branches or pull requests

4 participants