-
Notifications
You must be signed in to change notification settings - Fork 70
first draft of BoxObjects #278
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
base: master
Are you sure you want to change the base?
Conversation
After digging into the first issue, I realized I was overwriting the ALLOW OVERLAP objects with the default non-overlapping object ("segmented") included in CellProfiler, I fixed this issue so now the objects are truly overlapping. I was unable to replicate the second error raised by Erin ("the final object made with 1st is almost all nan measurements") so I could not track down the cause. One issue raised after these changes is that the Measure modules do not operate properly using the truly overlapping objects. Going forward, I will try to crop out single images for each cell and process those independently, and/or will discuss with Beth about updating the Measure modules to allow for overlapping objects ("ijv" instead of "segmented") |
def get_folder_name(self, workspace, filename_values): | ||
"""Get original folder name based on user input""" | ||
if self.file_name_method == FN_FROM_IMAGE: | ||
filename_image = [f for f in filename_values if f.startswith("r")][0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this is hardcoded to match specific file name structuring? I tested it on the demo pipeline images and it crashes here.
segmented[y_min:y_max, x_min:x_max] = object_id | ||
|
||
cropped_mask = input_label[y_min:y_max, x_min:x_max] == object_id | ||
mask_save_filename = f"Object{image_name}_{self.output_object_name.value}_{object_id}.tiff" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
image_name
should not be a part of the mask filename as objects are independent of images
Cellprofiler plugin with creates bounding box objects from the previously segmented objects