aics-int / microscope_automation

Automation software for the AICS Microscopes.
Other
4 stars 0 forks source link

BUG: Allow interactive position picking even if segmentation did not return positions #40

Closed wiegraebe closed 3 years ago

wiegraebe commented 3 years ago

Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Description

If segmentation in microscope_automation.segment_wells returns empty segmentation_info_dict, user does not have option to add positions manually and software crashes when calling

        position_list_for_csv = pos_list_saver.convert_to_stage_coords(
            positions_list=position_list_for_csv

Expected Behavior

Display position picker even if no positions were found and allow user to add positions at

                location_list = well_object.set_interactive_positions(
                    image_data, segmented_position_list, app
                )

Even if no positions are picked, software should not crash.

Reproduction

A minimal example that exhibits the behavior.

# Your code here

Environment

Any additional information about your environment

fletchapin commented 3 years ago

@wiegraebe I'm not 100% clear on how the position picker works. E.g. you say to call the position picker but I'm not quite sure how. It may be easier to chat about this so I can get a clearer picture tomorrow.

fletchapin commented 3 years ago

It's impossible to call the position picker when there is an empty segmentation_info_dict because the image_data comes from that dictionary.

With that said, I will make it so if no positions are picked the software doesn't crash.