How to trigger a tool recalculation after 'addToolState' for RectangleRoiTool?
See original GitHub issuePrerequisites
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING
guide.
Description
I am working currently on a tool that has to calculate a volume, this means, I draw an area using the RectangleRoiTool
, and then I have to replicate that area on X number of images. I am doing this by using addToolState
on each image, using the toolState
from the area I created. The problem is, when the script scrolls to the next image and adds the tool state, it doesn’t recalculate the Mean and StdDev of the current image, but it is saving the data from the created area. Is there an option to recalculate the state once it is added? Specifically for the RectangleRoiTool
.
Thanks!
Steps to Reproduce
- Draw a rectangle using
RectangleRoiTool
. - Save the tool state on a variable.
- Add the saved tool state on any other image. The calculations are still the ones from the variable, not the ones that should be from this new image.
Expected behavior: Once the tool state is added, it should recalculate the information from this new image.
Actual behavior: After setting the tool state, the information from the saved state is static, no recalculation is being triggered.
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (9 by maintainers)
Top GitHub Comments
Hi @JamesAPetts, I think it is an excellent idea, mainly because right now it is complicated to achieve what I wanted, though it was relatively easy to accomplish, I think this would resolve a lot of issues.
Hi @dannyrb. For now is OK. I will work in the future on a PR to have an automated method to accomplish this without any of these processes. I will let you know. Thanks!