http://imagej.273.s1.nabble.com/Plot-profile-not-working-with-Limit-To-Threshold-tp5024250p5024255.html
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
> 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