Would you please help with two Plot Profile questions?
1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? Thank you! Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 [hidden email]<mailto:[hidden email]> http://nyulmc.org/micros http://microscopynotes.com/ Voice direct only, no text or messages: 1-914-309-3270 and 1-646-501-0567 ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
sorry, I can't reproduce problem 1. I tried 8-bit and 32-bit images, rectangular and straight line selections, images with and without a threshold. It all works. Could you post a small macro (preferable with one of the sample images) that demonstrates the problem? 2. Segmented lines wider than 1 pixels: Yes, this is a know issue. In such a case the profile uses the Straightener (Edit>Selection>Straighten), which only works with splines. I had tried to change this a while ago, but I had got stuck - it is slightly more complicated than one might imagine... Michael ________________________________________________________________ On 30.11.20 16:32, Cammer, Michael wrote: > Would you please help with two Plot Profile questions? > > > 1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. > 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? > > > Thank you! > > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you for looking at this.
I posted screen snaps of the problem and a sample image: http://microscopynotes.com/temp/plot_profile_problem/plot_profile_not_limited.png http://microscopynotes.com/temp/plot_profile_problem/plot_profile_set_limited.png http://microscopynotes.com/temp/plot_profile_problem/plot_profile_problem_image.tif Best regards- Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 [hidden email]<mailto:[hidden email]> http://nyulmc.org/micros http://microscopynotes.com/ Voice direct only, no text or messages: 1-914-309-3270 and 1-646-501-0567 ________________________________ From: Michael Schmid <[hidden email]> Sent: Monday, November 30, 2020 10:43:13 AM To: [hidden email] Subject: Re: Plot profile not working with "Limit To Threshold" [EXTERNAL] Hi Michael, sorry, I can't reproduce problem 1. I tried 8-bit and 32-bit images, rectangular and straight line selections, images with and without a threshold. It all works. Could you post a small macro (preferable with one of the sample images) that demonstrates the problem? 2. Segmented lines wider than 1 pixels: Yes, this is a know issue. In such a case the profile uses the Straightener (Edit>Selection>Straighten), which only works with splines. I had tried to change this a while ago, but I had got stuck - it is slightly more complicated than one might imagine... Michael ________________________________________________________________ On 30.11.20 16:32, Cammer, Michael wrote: > Would you please help with two Plot Profile questions? > > > 1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. > 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? > > > Thank you! > > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory -- ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=gOntORUU267oSPIq0nSluUx78ac5mAWUy1VCiPUr__4&s=CpAZsm_kHMzb16ExUfYaGaGTo64r-7MG6XmYdo1UdG0&e= ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
ok, now I understand. You want to limit the profile to the thresholded pixels. Sorry, a profile is not a measurement in this sense, so it does not care about the threshold, irrespective of the "Limit to threshold" settings in Measurement Options. A possible workaround: Convert the image to 32 bits and then click 'apply' on the threshold panel, select "Set to NaN" for the background. NaN pixels will be ignored in line profiles. For this, it might make sense to disable "interpolate line profiles" in Edit>Options>Plots. Otherwise each pixel where a NaN (background) pixel contributes to the pixel value by interpolation will also become NaN, and you will get a smaller area because pixels near the border are missing. The downside is that without interpolation it won't be averaging over a wide line as nicely as it does with interpolation, because the pixel values will be sampled with a rotated grid and 1 pxl spacing along the rotated directions. So some pixels may be counted up to 4 times, others will be missed. Michael ________________________________________________________________ On 30.11.20 16:58, Cammer, Michael wrote: > Thank you for looking at this. > > > I posted screen snaps of the problem and a sample image: > > http://microscopynotes.com/temp/plot_profile_problem/plot_profile_not_limited.png > > http://microscopynotes.com/temp/plot_profile_problem/plot_profile_set_limited.png > > http://microscopynotes.com/temp/plot_profile_problem/plot_profile_problem_image.tif > > > Best regards- > > > ________________________________ > From: Michael Schmid > Sent: Monday, November 30, 2020 10:43:13 AM > To: [hidden email] > Subject: Re: Plot profile not working with "Limit To Threshold" > > > Hi Michael, > > sorry, I can't reproduce problem 1. I tried 8-bit and 32-bit images, > rectangular and straight line selections, images with and without a > threshold. It all works. > Could you post a small macro (preferable with one of the sample images) > that demonstrates the problem? > > 2. Segmented lines wider than 1 pixels: Yes, this is a know issue. > In such a case the profile uses the Straightener > (Edit>Selection>Straighten), which only works with splines. I had tried > to change this a while ago, but I had got stuck - it is slightly more > complicated than one might imagine... > > > > Michael > ________________________________________________________________ > On 30.11.20 16:32, Cammer, Michael wrote: >> Would you please help with two Plot Profile questions? >> >> >> 1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. >> 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? >> >> >> Thank you! >> >> >> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thank you!
I think run("Straighten...", "title=test_image line=40"); will fit our needs better. Best regards- Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY 10016 [hidden email]<mailto:[hidden email]> http://nyulmc.org/micros http://microscopynotes.com/ Voice direct only, no text or messages: 1-914-309-3270 and 1-646-501-0567 ________________________________ Sent: Monday, November 30, 2020 11:51:20 AM Subject: Re: Plot profile not working with "Limit To Threshold" [EXTERNAL] Hi Michael, ok, now I understand. You want to limit the profile to the thresholded pixels. Sorry, a profile is not a measurement in this sense, so it does not care about the threshold, irrespective of the "Limit to threshold" settings in Measurement Options. A possible workaround: Convert the image to 32 bits and then click 'apply' on the threshold panel, select "Set to NaN" for the background. NaN pixels will be ignored in line profiles. For this, it might make sense to disable "interpolate line profiles" in Edit>Options>Plots. Otherwise each pixel where a NaN (background) pixel contributes to the pixel value by interpolation will also become NaN, and you will get a smaller area because pixels near the border are missing. The downside is that without interpolation it won't be averaging over a wide line as nicely as it does with interpolation, because the pixel values will be sampled with a rotated grid and 1 pxl spacing along the rotated directions. So some pixels may be counted up to 4 times, others will be missed. Michael ________________________________________________________________ On 30.11.20 16:58, Cammer, Michael wrote: > Thank you for looking at this. > > > I posted screen snaps of the problem and a sample image: > > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fnot-5Flimited.png&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=lMduxkPqPzhZgfu1sM49lMfdoCGMn36Ilsnm0ZKN1ok&e= > > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fset-5Flimited.png&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=TpJYGiMk-cRvToliff-WtoekjwpVp9lR76e_-8w52go&e= > > https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fproblem-5Fimage.tif&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=4nYD5MBMECRQfWHm6F8I26ft3YzYZ6DXwFxMrljFZ5Y&e= > > > Best regards- > > > ________________________________ > From: Michael Schmid > Sent: Monday, November 30, 2020 10:43:13 AM > Subject: Re: Plot profile not working with "Limit To Threshold" > > > Hi Michael, > > sorry, I can't reproduce problem 1. I tried 8-bit and 32-bit images, > rectangular and straight line selections, images with and without a > threshold. It all works. > Could you post a small macro (preferable with one of the sample images) > that demonstrates the problem? > > 2. Segmented lines wider than 1 pixels: Yes, this is a know issue. > In such a case the profile uses the Straightener > (Edit>Selection>Straighten), which only works with splines. I had tried > to change this a while ago, but I had got stuck - it is slightly more > complicated than one might imagine... > > > > Michael > ________________________________________________________________ > On 30.11.20 16:32, Cammer, Michael wrote: >> Would you please help with two Plot Profile questions? >> >> >> 1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. >> 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? >> >> >> Thank you! >> >> >> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory -- ImageJ mailing list: https://urldefense.proofpoint.com/v2/url?u=http-3A__imagej.nih.gov_ij_list.html&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=aXyGpm4gOX1xprB3dx8yo9ox2SSywkjjwMEU9SGxnq8&e= ------------------------------------------------------------ This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. ================================= -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Michael,
yes, I agree! Straighten, then convert to 32 bits, transfer the threshold of the original image, apply with "Set to NaN". Then select all and do the profile over the rectangle. It could be a small macro (also closing the straightened image when the profile was done). Michael ________________________________________________________________ On 30.11.20 18:00, Cammer, Michael wrote: > Thank you! > > > I think run("Straighten...", "title=test_image line=40"); will fit our needs better. > > > Best regards- > > > Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory > > > ________________________________ > > Sent: Monday, November 30, 2020 11:51:20 AM > > Subject: Re: Plot profile not working with "Limit To Threshold" > > [EXTERNAL] > > Hi Michael, > > ok, now I understand. You want to limit the profile to the thresholded > pixels. Sorry, a profile is not a measurement in this sense, so it does > not care about the threshold, irrespective of the "Limit to threshold" > settings in Measurement Options. > > A possible workaround: Convert the image to 32 bits and then click > 'apply' on the threshold panel, select "Set to NaN" for the background. > NaN pixels will be ignored in line profiles. > > For this, it might make sense to disable "interpolate line profiles" in > Edit>Options>Plots. Otherwise each pixel where a NaN (background) pixel > contributes to the pixel value by interpolation will also become NaN, > and you will get a smaller area because pixels near the border are > missing. The downside is that without interpolation it won't be > averaging over a wide line as nicely as it does with interpolation, > because the pixel values will be sampled with a rotated grid and 1 pxl > spacing along the rotated directions. So some pixels may be counted up > to 4 times, others will be missed. > > > Michael > ________________________________________________________________ > On 30.11.20 16:58, Cammer, Michael wrote: >> Thank you for looking at this. >> >> >> I posted screen snaps of the problem and a sample image: >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fnot-5Flimited.png&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=lMduxkPqPzhZgfu1sM49lMfdoCGMn36Ilsnm0ZKN1ok&e= >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fset-5Flimited.png&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=TpJYGiMk-cRvToliff-WtoekjwpVp9lR76e_-8w52go&e= >> >> https://urldefense.proofpoint.com/v2/url?u=http-3A__microscopynotes.com_temp_plot-5Fprofile-5Fproblem_plot-5Fprofile-5Fproblem-5Fimage.tif&d=DwICaQ&c=j5oPpO0eBH1iio48DtsedeElZfc04rx3ExJHeIIZuCs&r=E0xNnPAQpUbDiPlC50tp7rW2nBkvV7fujQf0RknE5bU&m=in2aEEwuCKpsvEzDI_GRYcLBHnQxU7R3UNo-4w0-TBw&s=4nYD5MBMECRQfWHm6F8I26ft3YzYZ6DXwFxMrljFZ5Y&e= >> >> >> Best regards- >> >> >> ________________________________ >> From: Michael Schmid >> Sent: Monday, November 30, 2020 10:43:13 AM >> Subject: Re: Plot profile not working with "Limit To Threshold" >> >> >> Hi Michael, >> >> sorry, I can't reproduce problem 1. I tried 8-bit and 32-bit images, >> rectangular and straight line selections, images with and without a >> threshold. It all works. >> Could you post a small macro (preferable with one of the sample images) >> that demonstrates the problem? >> >> 2. Segmented lines wider than 1 pixels: Yes, this is a know issue. >> In such a case the profile uses the Straightener >> (Edit>Selection>Straighten), which only works with splines. I had tried >> to change this a while ago, but I had got stuck - it is slightly more >> complicated than one might imagine... >> >> >> >> Michael >> ________________________________________________________________ >> On 30.11.20 16:32, Cammer, Michael wrote: >>> Would you please help with two Plot Profile questions? >>> >>> >>> 1. Plot profile is not working with "Limit To Threshold" checked in measurements window. Is this normal or a bug? I can write a work-around if this is expected behavior, but wanted to check first. >>> 2. Segmented lines wider than 1 pixel are changed to spline fits when running profile plots. Is this a change? >>> >>> >>> Thank you! >>> >>> >>> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |