Closed bancroftg closed 1 week ago
Hi @bancroftg - thanks for reporting, I can see that the button mistakenly had been disabled by default in the latest version, so I enabled it. If you update simba with pip install simba-uw-tf-dev --upgrade
how does it look on your end?
PS. I don't have a public method do draw ROIs from a preset radius/width/height.. I've had a few requests for it, but haven't got a good idea for how to implement it graphically/interactively in the GUI.
Thank you for your speedy response! The update worked great!
As for the ROI preset size, I figured it would function something like the input window in step 4 of "Defining ROIs", and the shape dimensions were part of the editable "shape attributes" the ROI settings. Then the "pixels per mm" conversion factor predefined in the video parameters would be applied when drawing. https://github.com/sgoldenlab/simba/blob/master/docs/ROI_tutorial.md#part-1-defining-rois-in-simba But I now see the note below about implementing this in future versions :)
For now, do you think it would work to directly edit the ROI_difinitions.h5 file?
Yeah, - you could but it may be a little tricky: the ROI_difinitions.h5
file, on top of my head, stores the geometries location and sizes as pixel values, there is no metric converted values, you would have to deal with that. I have an idea for a pop up window where you specify radius of circles or width and heights for rectangles and add them to your drawings. Give me till next week and I will stick it in the main program, but give me a nudge if I haven't got back to you.
Hi @bancroftg - I inserted an option to draw ROIs defined by specified metric sizes from user in the SimBA GUI, and I would appreciate feedback when you get a chance. If you update simba with pip install simba-uw-tf-dev --upgrade
and have version 2.1.4 or more you should see it.
I am pasting instructions below for how to use it, as I haven't got it baked in to the documentation yet.
Please let me know what you think.
Simon
...................................................................................
First, open the File (ROI)
drop-down menu at the head of the Region of interest
window and click the Draw ROIs of pre-defined sizes
option.
Once clicked, you should see the following pop-up opening allowing you to draw a range of different shapes with specified sizes. If you need a shape-type that is missing, consider letting us know through Gitter or by opening en issue on GithHub.
In the SETTINGS
frame, fill in the name of your ROI, and choose its color, thickness, and ear tag size.
To draw a RECTANGLE of set size, fill in its metric width and height in millimeter and click ADD RECTANGLE
as in the video below:
predefined_sizes_rectangle.webm
To draw a CIRCLE with a specific radius, fill in its metric radius in millimeter and click ADD CIRCLE
as in the video below:
To draw a HEXAGON with a specific radius, fill in its metric radius in millimeter and click ADD HEXAGON
as in the video below:
To draw a HALF CIRCLE with a specific radius with its chunky part pointing UP, fill in its metric radius in millimeter, choose NORTH
in the direction drop-down menu
, and click ADD HALF CIRCLE
as in the video below:
predefined_sizes_half_circle_north.webm
To draw a HALF CIRCLE with a specific radius with its chunky part pointing LEFT, fill in its metric radius in millimeter, choose WEST
in the direction drop-down menu
, and click ADD HALF CIRCLE
as in the video below:
Hi Simon,
Thank you so much for adding this tool! It is working PERFECTLY for me.
Best, Grace
Cheers Grace, please let me know if you encounter any bugs or oddities 👍🏻
Show shape info button when generating ROIs is not working for me. I expected ROI size values to pop up in the 'Define shape' window, as demonstrated in the example: https://github.com/sgoldenlab/simba/blob/master/docs/ROI_tutorial_new.md#show-shape-size-information
I enlarged the ROI preference settings to ensure the text size and thickness would be visible and checked that these settings saved in the main menu. After doing this I clicked on 'show shape info' in the shape interaction panel, and still nothing appeared.
Additional context Is there a way for me to preset the size of my ROIs? For example, I would like my circular ROIs to have a radius of 70mm