create an image according to its radial profile

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

create an image according to its radial profile

Michael Elbaum
Dear listers,       I'd like to generate a grayscale image based on a radial profile curve. I wonder if such a procedure/macro might already exist.
thanks for any help,
Michael


Prof Michael Elbaum
Dept of Materials and Interfaces
Weizmann Institute of Science

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Robert Nshimirimana
Dear,
You can try or modify this plugin:
http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_measure:start
regards
Robert



Robert Nshimirimana
Scientist
Tel: +27-12-305-5638
Fax: +27-12-305-5851
Cell:+27-72-967-3257
Email: [hidden email]
Website: www.necsa.co.za

This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version from NECSA.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Michael Elbaum
Sent: 05 October 2016 11:31 PM
To: [hidden email]
Subject: create an image according to its radial profile

Dear listers,       I'd like to generate a grayscale image based on a radial profile curve. I wonder if such a procedure/macro might already exist.
thanks for any help,
Michael


Prof Michael Elbaum
Dept of Materials and Interfaces
Weizmann Institute of Science

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

#####################################################################################
Scanned by MailMarshal - Trustwave's comprehensive email content security solution.
Download a free evaluation of MailMarshal at www.trustwave.com
#####################################################################################

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Michael Schmid
Hi Michael,

you could try the Polar Transformer plugin in 'Cartesian' mode
   https://imagej.nih.gov/ij/plugins/polar-transformer.html

Create a 1D image from the profile, and then transform to polar.
It seems that the Polar Transformer needs the image at least two lines
high, so you actually need an image with two equal lines.

If you have the data in a file, read it via Import>Raw (binary data) or
Import>Text Image (list of numbers) to get the 1D image. If the input
data are pairs of r & value, delete the 'r' column by cropping the
image, leaving only the second column. If you have with a vertical image
(column of pixels), rotate it 90°. Then adjust the size to get the two
lines.

<or check the Polar Transformer code and fix the problem that makes it
crash with a single line of pixels>

Michael
________________________________________________________________

On 2016-10-05 23:30, Michael Elbaum wrote:

> Dear listers,

> I'd like to generate a grayscale image based on a radial profile
> curve. I wonder if such a procedure/macro might already exist. thanks
> for any help, Michael
>
>
> Prof Michael Elbaum

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Gabriel Landini
In reply to this post by Robert Nshimirimana
On Friday 07 Oct 2016 12:25:50 you wrote:
> You can try or modify this plugin:
> http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_meas
> ure:start
> regards
> Robert

It is not possible to modify that plugin unless you provide the source code
(*.java file) for download.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Michael Elbaum
Thanks for the suggestions, but still it doesn't work. Maybe my concept is off. I have a 1D radial function that I want to represent as a 2D image where the intensity at each pixel depends on its radial distance to the center. This should be like mirroring the function at the center of a 1D image (of twice the width) and drawing circles matching the intensity at each point on the axis across the second dimension. The polar transformer plugin is giving me a smeared cross shape with max intensity on the x and y axes. Maybe it will be easier to fill the image in pixel by pixel taking care of the interpolations.
regards,
Michael

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Gabriel Landini [[hidden email]]
Sent: Friday, October 07, 2016 16:11
To: [hidden email]
Subject: Re: create an image according to its radial profile

On Friday 07 Oct 2016 12:25:50 you wrote:
> You can try or modify this plugin:
> http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_meas
> ure:start
> regards
> Robert

It is not possible to modify that plugin unless you provide the source code
(*.java file) for download.

Regards

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Herbie
Dear Michael,

is the 1D-function given analytically?

If no, was it sampled according to the sampling theorem?

In the first case it is easy to write a macro that performs what you
want. In the second, interpolation should help, but I fear a plugin will
be necessary.

Best

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 07.10.16 um 16:18 schrieb Michael Elbaum:

> Thanks for the suggestions, but still it doesn't work. Maybe my
> concept is off. I have a 1D radial function that I want to represent
> as a 2D image where the intensity at each pixel depends on its radial
> distance to the center. This should be like mirroring the function at
> the center of a 1D image (of twice the width) and drawing circles
> matching the intensity at each point on the axis across the second
> dimension. The polar transformer plugin is giving me a smeared cross
> shape with max intensity on the x and y axes. Maybe it will be easier
> to fill the image in pixel by pixel taking care of the
> interpolations. regards, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Gabriel Landini
> [[hidden email]] Sent: Friday, October 07, 2016 16:11 To:
> [hidden email] Subject: Re: create an image according to its
> radial profile
>
> On Friday 07 Oct 2016 12:25:50 you wrote:
>> You can try or modify this plugin:
>> http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_meas
>>
>>
ure:start

>> regards Robert
>
> It is not possible to modify that plugin unless you provide the
> source code (*.java file) for download.
>
> Regards
>
> Gabriel
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Michael Elbaum
No, I have it as a list. Each point corresponds to a radius I want to represent in the 2D image, equally spaced so matching "pixels" perfectly on the axes. Interpolation is needed around the arcs.
best,
Michael

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Herbie [[hidden email]]
Sent: Friday, October 07, 2016 17:33
To: [hidden email]
Subject: Re: create an image according to its radial profile

Dear Michael,

is the 1D-function given analytically?

If no, was it sampled according to the sampling theorem?

In the first case it is easy to write a macro that performs what you
want. In the second, interpolation should help, but I fear a plugin will
be necessary.

Best

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 07.10.16 um 16:18 schrieb Michael Elbaum:

> Thanks for the suggestions, but still it doesn't work. Maybe my
> concept is off. I have a 1D radial function that I want to represent
> as a 2D image where the intensity at each pixel depends on its radial
> distance to the center. This should be like mirroring the function at
> the center of a 1D image (of twice the width) and drawing circles
> matching the intensity at each point on the axis across the second
> dimension. The polar transformer plugin is giving me a smeared cross
> shape with max intensity on the x and y axes. Maybe it will be easier
> to fill the image in pixel by pixel taking care of the
> interpolations. regards, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Gabriel Landini
> [[hidden email]] Sent: Friday, October 07, 2016 16:11 To:
> [hidden email] Subject: Re: create an image according to its
> radial profile
>
> On Friday 07 Oct 2016 12:25:50 you wrote:
>> You can try or modify this plugin:
>> http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_meas
>>
>>
ure:start

>> regards Robert
>
> It is not possible to modify that plugin unless you provide the
> source code (*.java file) for download.
>
> Regards
>
> Gabriel
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Michael Schmid
In reply to this post by Michael Elbaum
Hi Michael,

it works for me; try this macro:

values=newArray(0,5,255,3,5,8,9,150,223,4,5,6,7,99,199,200,255);
newImage("8-bit","theProfile",values.length, 2, 1);
for (i=0; i<values.length; i++) {
   putPixel(i,0,values[i]);
   putPixel(i,1,values[i]);
}
run("Polar Transformer", "method=Cartesian degrees=360 default_center
for_polar_transforms,");

Beware of possible line breaks introduced by the mailer; ther should be
one long line after the closing curly braces.

Michael
________________________________________________________________


On 2016-10-07 16:18, Michael Elbaum wrote:

> Thanks for the suggestions, but still it doesn't work. Maybe my
> concept is off. I have a 1D radial function that I want to represent
> as a 2D image where the intensity at each pixel depends on its radial
> distance to the center. This should be like mirroring the function at
> the center of a 1D image (of twice the width) and drawing circles
> matching the intensity at each point on the axis across the second
> dimension. The polar transformer plugin is giving me a smeared cross
> shape with max intensity on the x and y axes. Maybe it will be easier
> to fill the image in pixel by pixel taking care of the
> interpolations. regards, Michael

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Herbie
In reply to this post by Michael Elbaum
Dear Michael,

as I've written, in case the 1D-function is given as samples (list),
interpolation is required and can be achieved with a ImageJ-plugin.

I don't know about such a plugin, but it may exist. Otherwise you need
to write it...

Best

Herbie

:::::::::::::::::::::::::::::::::::::::::::
Am 07.10.16 um 16:43 schrieb Michael Elbaum:

> No, I have it as a list. Each point corresponds to a radius I want to
> represent in the 2D image, equally spaced so matching "pixels"
> perfectly on the axes. Interpolation is needed around the arcs.
> best, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Herbie [[hidden email]] Sent:
> Friday, October 07, 2016 17:33 To: [hidden email] Subject: Re:
> create an image according to its radial profile
>
> Dear Michael,
>
> is the 1D-function given analytically?
>
> If no, was it sampled according to the sampling theorem?
>
> In the first case it is easy to write a macro that performs what you
> want. In the second, interpolation should help, but I fear a plugin
> will be necessary.
>
> Best
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::: Am 07.10.16 um 16:18
> schrieb Michael Elbaum:
>> Thanks for the suggestions, but still it doesn't work. Maybe my
>> concept is off. I have a 1D radial function that I want to
>> represent as a 2D image where the intensity at each pixel depends
>> on its radial distance to the center. This should be like mirroring
>> the function at the center of a 1D image (of twice the width) and
>> drawing circles matching the intensity at each point on the axis
>> across the second dimension. The polar transformer plugin is giving
>> me a smeared cross shape with max intensity on the x and y axes.
>> Maybe it will be easier to fill the image in pixel by pixel taking
>> care of the interpolations. regards, Michael
>>
>> ________________________________________ From: ImageJ Interest
>> Group [[hidden email]] on behalf of Gabriel Landini
>> [[hidden email]] Sent: Friday, October 07, 2016 16:11 To:
>> [hidden email] Subject: Re: create an image according to its
>> radial profile
>>
>> On Friday 07 Oct 2016 12:25:50 you wrote:
>>> You can try or modify this plugin:
>>> http://imagejdocu.tudor.lu/doku.php?id=plugin:analysis:radial_thickness_meas
>>>
>>>
>
>>>
ure:start

>>> regards Robert
>>
>> It is not possible to modify that plugin unless you provide the
>> source code (*.java file) for download.
>>
>> Regards
>>
>> Gabriel
>>
>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: create an image according to its radial profile

Michael Elbaum
In reply to this post by Michael Schmid
It's working now. thanks!
Michael

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Michael Schmid [[hidden email]]
Sent: Friday, October 07, 2016 17:51
To: [hidden email]
Subject: Re: create an image according to its radial profile

Hi Michael,

it works for me; try this macro:

values=newArray(0,5,255,3,5,8,9,150,223,4,5,6,7,99,199,200,255);
newImage("8-bit","theProfile",values.length, 2, 1);
for (i=0; i<values.length; i++) {
   putPixel(i,0,values[i]);
   putPixel(i,1,values[i]);
}
run("Polar Transformer", "method=Cartesian degrees=360 default_center
for_polar_transforms,");

Beware of possible line breaks introduced by the mailer; ther should be
one long line after the closing curly braces.

Michael
________________________________________________________________


On 2016-10-07 16:18, Michael Elbaum wrote:

> Thanks for the suggestions, but still it doesn't work. Maybe my
> concept is off. I have a 1D radial function that I want to represent
> as a 2D image where the intensity at each pixel depends on its radial
> distance to the center. This should be like mirroring the function at
> the center of a 1D image (of twice the width) and drawing circles
> matching the intensity at each point on the axis across the second
> dimension. The polar transformer plugin is giving me a smeared cross
> shape with max intensity on the x and y axes. Maybe it will be easier
> to fill the image in pixel by pixel taking care of the
> interpolations. regards, Michael

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html