-
Notifications
You must be signed in to change notification settings - Fork 13
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
New ROI objects created when editing existing ROIs? #64
Comments
@jayyoung Yes now we also store the history of ROIs as @kunzel requested. Luckily I have also created a service for querying ROIS. You can use the service soma/query_rois for that. But I think there is no option to get the latest roi for each id. I will see how it can be done. Thanks for pointing this out. |
Yeah that's the service I'm using, I updated everything to use the new methods, but noticed this behaviour. It'd be really nice to be able to just query the most recent version of all the ROIs with a flag in the service call or something in order to get the current state. Or maybe instead of inserting a new entry into the database entirely when an ROI is updated, just keep the same database entry, but update a vector of the previous poses. So roi.poses[0] gets me the most recent posearray of the ROI, roi.poses[1] gets me the previous posearray, and so on. Not sure what's easiest/best, probably just a flag in the service call. |
@jayyoung I have updated the roi query service with the flag returnmostrecent which will return you the most recent versions of rois when set to true. I have also opened a pull request for mongodb_store because the latest version of soma needs to have the updated version of mongodb_store. For an immediate solution you can use this version https://github.com/hkaraoguz/mongodb_store/tree/somaroiupdate |
Woo awesome! Thank you! |
@jayyoung Did you check the functionality? Should we close this issue? |
Yep sure sorry I only just got around to testing it. It seems to work just fine. Here is the test code I used to verify it in case you care:
|
In the latest commit on the update branch, is this the right behaviour? I add a new ROI, and then every time I edit it by moving one of the vertices, a brand new ROI object is entered into the database with the same ID as the old one, but with the new vertices and a more recent timestamp, rather than (what I would expect, and how it worked in the past) updating the old ROI object.
Am I doing something wrong? This makes it hard to do what I have been doing before-- getting all the ROIs from the database, picking one, and seeing if a given point is in that ROI. I guess this is for learning dynamic ROIs online that might change over time? But I think there should be a service to just return the set of most up-to-date ROIs for everything. Maybe there is and I am just using the wrong service call?
@hkaraoguz ?
The text was updated successfully, but these errors were encountered: