ImperialCollegeLondon / Junction_Mapper

Java desktop client software for analysing biological images of cell junctions
https://dataman.bioinformatics.ic.ac.uk/junction_mapper
GNU General Public License v3.0
5 stars 1 forks source link

Edgemap from another software_edgemap not binary type error #2

Closed pr4deepr closed 4 years ago

pr4deepr commented 4 years ago

Hi I have been testing out your software and encountered a problem. I would like to load an 8 bit edgemap I generated in ImageJ into Junction Mapper, but I keep getting an error: Edgemap is not binary type. I loaded the edgemap generated from example data onto ImageJ and resaved it as png to see if that works and still got the error. I used ImageJ to have a look at the differences and when I hover my mouse over the image, the 8 bit grayscale image generated in ImageJ has a value of either 0 or 1, but the edgemap from Junction Mapper is an 8-bit color image has index of either 0 or 1 and value of 0,0,0 or 255,255,255. I tried converting the ImageJ binary image to 8-bit Color, but it still doesn't help. Do you have any suggestions? I could use ImageJ or Python to resave the Images in a format that works for Junction Mapper.

Thanks for this software!

hawkenbury commented 4 years ago

Hi Pradeep,

The image that you are trying to load is not truly a binary image that the program is expecting – it sounds like it is still in gray scale format but with only two values 0 and 255. The image needs to be in the form as defined in the Java class BufferedImage BufferedImage.TYPE_BYTE_BINARY There is a lot of information on the web about how to convert between the different formats. One thing you could do is to load the image in at the start of the program and convert and save it in the Junction_Mapper program, I think that might work but you would need a 3 channel image

Best Wishes


Chris Tomlinson Senior Data Systems Developer Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building, South Kensington Campus, Imperial College London SW72AZ 020 7594 5072 http://www.imperial.ac.uk/people/chris.tomlinson

From: Pradeep Rajasekhar [mailto:notifications@github.com] Sent: 03 April 2020 07:38 To: ImperialCollegeLondon/Junction_Mapper Junction_Mapper@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [ImperialCollegeLondon/Junction_Mapper] Edgemap from another software_edgemap not binary type error (#2)

This email from notifications@github.commailto:notifications@github.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

Hi I have been testing out your software and encountered a problem. I would like to load an 8 bit edgemap I generated in ImageJ into Junction Mapper, but I keep getting an error: Edgemap is not binary type. I loaded the edgemap generated from example data onto ImageJ and resaved it as png to see if that works and still got the error. I used ImageJ to have a look at the differences and when I hover my mouse over the image, the 8 bit grayscale image generated in ImageJ has a value of either 0 or 1, but the edgemap from Junction Mapper is an 8-bit color image has index of either 0 or 1 and value of 0,0,0 or 255,255,255. I tried converting the ImageJ binary image to 8-bit Color, but it still doesn't help. Do you have any suggestions? I could use ImageJ or Python to resave the Images in a format that works for Junction Mapper.

Thanks for this software!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ImperialCollegeLondon/Junction_Mapper/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGB7SG3B2OCRZWHXCK6QGTRKV743ANCNFSM4L3QRBDQ.

pr4deepr commented 4 years ago

Hi Thank you for the prompt response. I used the getImage() method in ImageJ to convert the image into BufferedImage.TYPE_BYTE_BINARY Only thing that was different was when I saved the image from ImageJ after this conversion, the white pixels had a value of -1 and black pixels were a large negative number. So, I added an extra option to set the pixels to Color.WHITE if pixel value was -1. I am not sure if this is the right way to do it, but it seems to work.

After that, this binary image imports as an edge map into the Junction mapper program. Thanks for this software, I really like the way the program quantifies the junctions and exports various parameters.

Cheers

hawkenbury commented 4 years ago

Hi Pradeep,

Thanks for your message and I am glad you have found out how to import the images that you wanted Really glad that you are finding junction mapper useful.

Best Wishes


Chris Tomlinson Senior Data Systems Developer Bioinformatics Data Science Group, Room 126, Sir Alexander Fleming Building, South Kensington Campus, Imperial College London SW72AZ 020 7594 5072 http://www.imperial.ac.uk/people/chris.tomlinson

From: Pradeep Rajasekhar [mailto:notifications@github.com] Sent: 12 April 2020 08:18 To: ImperialCollegeLondon/Junction_Mapper Junction_Mapper@noreply.github.com Cc: Tomlinson, Christopher D chris.tomlinson@imperial.ac.uk; Comment comment@noreply.github.com Subject: Re: [ImperialCollegeLondon/Junction_Mapper] Edgemap from another software_edgemap not binary type error (#2)

This email from notifications@github.commailto:notifications@github.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders listhttps://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.

Hi Thank you for the prompt response. I used the getImage() method in ImageJ to convert the image into BufferedImage.TYPE_BYTE_BINARY Only thing that was different was when I saved the image from ImageJ after this conversion, the white pixels had a value of -1 and black pixels were a large negative number. So, I added an extra option to set the pixels to Color.WHITE if pixel value was -1. I am not sure if this is the right way to do it, but it seems to work.

After that, this binary image imports as an edge map into the Junction mapper program. Thanks for this software, I really like the way the program quantifies the junctions and exports various parameters.

Cheers

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/ImperialCollegeLondon/Junction_Mapper/issues/2#issuecomment-612575032, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGB7SFPJ5RO3XU6BETDWVDRMFTJ5ANCNFSM4L3QRBDQ.