Skip to content
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

only save outlines/overlay as skeleton? #4

Open
Mrc010 opened this issue Nov 26, 2021 · 1 comment
Open

only save outlines/overlay as skeleton? #4

Mrc010 opened this issue Nov 26, 2021 · 1 comment

Comments

@Mrc010
Copy link

Mrc010 commented Nov 26, 2021

Hi there,

thanks a lot for your useful plugin. Instead of saving a JPG image with the original image and the outlined ROIs, I'd rather only store the outlined ROIs (aka skeleton/binary image) to be able to further process these skeleton images in another software. I will look into your python script ( # Section Save jpg with outlines) whether I can modify it accordingly. But any suggestions would be much appreciated.

@Mrc010 Mrc010 changed the title only save outlines as skeleton? only save outlines/overlay as skeleton? Nov 26, 2021
@Mrc010
Copy link
Author

Mrc010 commented Nov 26, 2021

Okay, the following modification worked for me...

original code:

                   # Section Save jpg with outlines
                   path_to_multiple_outline = os.path.join(str(gvars['path_multiple_image_directory']),original_name + "_Erosion_" +str(self.pix_erosion_mult)+ "px_" + "Outlines.jpg")
                   outlines_image = original_image.flatten()
                   IJ.saveAs(outlines_image, "JPG", path_to_multiple_outline)

modified code:

                   # Section Save jpg with outlines
                   path_to_multiple_outline = os.path.join(str(gvars['path_multiple_image_directory']),original_name + "_Erosion_" +str(self.pix_erosion_mult)+ "px_" + "Outlines.jpg")
                   IJ.run(original_image, "Select All", "");
                   IJ.setBackgroundColor(0, 0, 0);
                   IJ.run(original_image, "Clear", "slice");
                   outlines_image = original_image.flatten()
                   IJ.saveAs(outlines_image, "JPG", path_to_multiple_outline)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant