create image from radial profile

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

create image from radial profile

Michael Elbaum
Dear list,     I'm wondering if there's a plugin available to do the "inverse" of the Radial Profile: given a theoretical curve I want to simulate an image.
thanks,
Michael

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

Re: create image from radial profile

Herbie
Dear Michael,

the valuable ImageJ-plugin "Radial Profile" sums the image values on
concentric circles and displays the normalized sums as a function of the
radii of these circles. Consequently, the result is a 1-dimensional
curve with the radius as the abscissa.

Due to the circular summing, this operation can't be reversed or, as
you've put it, it can't be "inverted".

What you may achieve however, is to generate a radially symmetric image
from a profile. If the profile is given analytically you can use

        "Process > Math > Macro"

as it was suggested by Jerome Mutterer:
<http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cross-section/2379>

Here is his example macro using a shifted Gaussian profile:

        newImage( "Image from Profile", "8-bit black", 256, 256, 1 );
        run( "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );

HTH

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 05.02.17 um 08:47 schrieb Michael Elbaum:
> Dear list,     I'm wondering if there's a plugin available to do the
> "inverse" of the Radial Profile: given a theoretical curve I want to
> simulate an image. thanks, Michael
>
> -- 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 image from radial profile

Michael Elbaum
Thanks Herbie,

This is just what I was looking for, to generate a radially symmetric image from a given profile. I have the profile only as a list, though, rather than a function, so it should be interpolated from 1D on "x" to the radius. I vaguely remember seeing something that can do this in ImageJ, but might be imagining.

best,
Michael

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of Herbie [[hidden email]]
Sent: Sunday, February 05, 2017 14:41
To: [hidden email]
Subject: Re: create image from radial profile

Dear Michael,

the valuable ImageJ-plugin "Radial Profile" sums the image values on
concentric circles and displays the normalized sums as a function of the
radii of these circles. Consequently, the result is a 1-dimensional
curve with the radius as the abscissa.

Due to the circular summing, this operation can't be reversed or, as
you've put it, it can't be "inverted".

What you may achieve however, is to generate a radially symmetric image
from a profile. If the profile is given analytically you can use

        "Process > Math > Macro"

as it was suggested by Jerome Mutterer:
<http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cross-section/2379>

Here is his example macro using a shifted Gaussian profile:

        newImage( "Image from Profile", "8-bit black", 256, 256, 1 );
        run( "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );

HTH

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 05.02.17 um 08:47 schrieb Michael Elbaum:
> Dear list,     I'm wondering if there's a plugin available to do the
> "inverse" of the Radial Profile: given a theoretical curve I want to
> simulate an image. thanks, Michael
>
> -- 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 image from radial profile

Herbie
Dear Michael,

after experimenting with several approaches I think I found a promising
method that works sufficiently accurate, at least for smooth 1D curves
(list of values). For the example of Jerome Mutterer (Doughnut), the
RMS-deviation of the resulting images is about 6*10^-4.

I hope to be able to post the macro tomorrow. Please stay tuned!

Best

Herbie

::::::::::::::::::::::::::::::::::::::::::::
Am 05.02.17 um 16:08 schrieb Michael Elbaum:

> Thanks Herbie,
>
> This is just what I was looking for, to generate a radially symmetric
> image from a given profile. I have the profile only as a list,
> though, rather than a function, so it should be interpolated from 1D
> on "x" to the radius. I vaguely remember seeing something that can do
> this in ImageJ, but might be imagining.
>
> best, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Herbie [[hidden email]] Sent:
> Sunday, February 05, 2017 14:41 To: [hidden email] Subject: Re:
> create image from radial profile
>
> Dear Michael,
>
> the valuable ImageJ-plugin "Radial Profile" sums the image values on
> concentric circles and displays the normalized sums as a function of
> the radii of these circles. Consequently, the result is a
> 1-dimensional curve with the radius as the abscissa.
>
> Due to the circular summing, this operation can't be reversed or, as
> you've put it, it can't be "inverted".
>
> What you may achieve however, is to generate a radially symmetric
> image from a profile. If the profile is given analytically you can
> use
>
> "Process > Math > Macro"
>
> as it was suggested by Jerome Mutterer:
> <http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cross-section/2379>
>
>  Here is his example macro using a shifted Gaussian profile:
>
> newImage( "Image from Profile", "8-bit black", 256, 256, 1 ); run(
> "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::: Am 05.02.17 um 08:47
> schrieb Michael Elbaum:
>> Dear list,     I'm wondering if there's a plugin available to do
>> the "inverse" of the Radial Profile: given a theoretical curve I
>> want to simulate an image. thanks, Michael
>>
>> -- 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 image from radial profile

Herbie
In reply to this post by Michael Elbaum
Dear Michael and all those who are interested!

The approach that I should like to propose for the computation of the
        "Radially Symmetric Function from its Profile"
makes use of the
        "Central Slice Theorem"
of the Fourier calculus.^1


Processing steps:

1.
The horizontal 1D profile function is centered to a [ n * n ] image support.

2.
The image is 2D Fourier-transformed which leads to the vertical
projection of the 1D Fourier-transform of the profile.

3.
Rotated versions of the resulting 2D Fourier-spectrum are summed.
The angle increment must at least be [ 360 / (n * PI) ] and the
rotations go from 0...180 deg.^2

4.
The resulting sum of Fourier-spectra is then Fourier re-transformed and
gives the desired radially symmetric function.

The quality of the resulting radially symmetric image function can be
improved by increasing the resolution of the Fourier-spectrum which is
achieved by simply using a larger image support in step 1.


The approach is well-suited for macro-implementations, because all
time-consuming operations (ffts & rotations) are performed by
core-plugins of ImageJ.

Best

Herbie

_____________________
^1
_Bracewell (1956)_
<http://adsabs.harvard.edu/full/1956aujph...9..198b>
_Glünder (1986)_
<www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1986-2>
^2
_Herman G.T. (1980)_ "Image reconstruction from projections". Academic.
_Platzer H. (1981)_ "Optical image processing". In: Oja E. and Simula O.
(eds.) The second Scandinavian conference on image analysis. Pattern
Recognition Society of Finland, Espoo/Finland, pp. 128-138.
_Glünder (2013)_
<www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-2013-1>

::::::::::::::::::::::::::::::::::::::::::::
Am 05.02.17 um 16:08 schrieb Michael Elbaum:

> Thanks Herbie,
>
> This is just what I was looking for, to generate a radially symmetric
> image from a given profile. I have the profile only as a list,
> though, rather than a function, so it should be interpolated from 1D
> on "x" to the radius. I vaguely remember seeing something that can do
> this in ImageJ, but might be imagining.
>
> best, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Herbie [[hidden email]] Sent:
> Sunday, February 05, 2017 14:41 To: [hidden email] Subject: Re:
> create image from radial profile
>
> Dear Michael,
>
> the valuable ImageJ-plugin "Radial Profile" sums the image values on
> concentric circles and displays the normalized sums as a function of
> the radii of these circles. Consequently, the result is a
> 1-dimensional curve with the radius as the abscissa.
>
> Due to the circular summing, this operation can't be reversed or, as
> you've put it, it can't be "inverted".
>
> What you may achieve however, is to generate a radially symmetric
> image from a profile. If the profile is given analytically you can
> use
>
> "Process > Math > Macro"
>
> as it was suggested by Jerome Mutterer:
> <http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cross-section/2379>
>
>  Here is his example macro using a shifted Gaussian profile:
>
> newImage( "Image from Profile", "8-bit black", 256, 256, 1 ); run(
> "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::: Am 05.02.17 um 08:47
> schrieb Michael Elbaum:
>> Dear list,     I'm wondering if there's a plugin available to do
>> the "inverse" of the Radial Profile: given a theoretical curve I
>> want to simulate an image. thanks, Michael
>>
>> -- 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 image from radial profile

Jeremy Adler-2
Dear All,
A rather crude method would be to first turn the image into one where the distances from the designated centre of the circle are marked - a distance map from a single point.
Then use a LUT to change the distances into the sequence of intensities that you want.
LUTs are just lists of numbers, so they can be created and edited quite easily.
The intensities/colours imposed by the LUT can then be made permanent.
A limitation is that only 256 different intensities are available with a LUT - but the final image could always be smoothed to create intermediate values and Transform/Bin with differential x and y axis compression/stretch would create ovals.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Herbie
Sent: den 7 februari 2017 20:30
To: [hidden email]
Subject: Re: create image from radial profile

Dear Michael and all those who are interested!

The approach that I should like to propose for the computation of the
        "Radially Symmetric Function from its Profile"
makes use of the
        "Central Slice Theorem"
of the Fourier calculus.^1


Processing steps:

1.
The horizontal 1D profile function is centered to a [ n * n ] image support.

2.
The image is 2D Fourier-transformed which leads to the vertical projection of the 1D Fourier-transform of the profile.

3.
Rotated versions of the resulting 2D Fourier-spectrum are summed.
The angle increment must at least be [ 360 / (n * PI) ] and the rotations go from 0...180 deg.^2

4.
The resulting sum of Fourier-spectra is then Fourier re-transformed and gives the desired radially symmetric function.

The quality of the resulting radially symmetric image function can be improved by increasing the resolution of the Fourier-spectrum which is achieved by simply using a larger image support in step 1.


The approach is well-suited for macro-implementations, because all time-consuming operations (ffts & rotations) are performed by core-plugins of ImageJ.

Best

Herbie

_____________________
^1
_Bracewell (1956)_
<http://adsabs.harvard.edu/full/1956aujph...9..198b>
_Glünder (1986)_
<www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1986-2>
^2
_Herman G.T. (1980)_ "Image reconstruction from projections". Academic.
_Platzer H. (1981)_ "Optical image processing". In: Oja E. and Simula O.
(eds.) The second Scandinavian conference on image analysis. Pattern Recognition Society of Finland, Espoo/Finland, pp. 128-138.
_Glünder (2013)_
<www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-2013-1>

::::::::::::::::::::::::::::::::::::::::::::
Am 05.02.17 um 16:08 schrieb Michael Elbaum:

> Thanks Herbie,
>
> This is just what I was looking for, to generate a radially symmetric
> image from a given profile. I have the profile only as a list, though,
> rather than a function, so it should be interpolated from 1D on "x" to
> the radius. I vaguely remember seeing something that can do this in
> ImageJ, but might be imagining.
>
> best, Michael
>
> ________________________________________ From: ImageJ Interest Group
> [[hidden email]] on behalf of Herbie [[hidden email]] Sent:
> Sunday, February 05, 2017 14:41 To: [hidden email] Subject: Re:
> create image from radial profile
>
> Dear Michael,
>
> the valuable ImageJ-plugin "Radial Profile" sums the image values on
> concentric circles and displays the normalized sums as a function of
> the radii of these circles. Consequently, the result is a
> 1-dimensional curve with the radius as the abscissa.
>
> Due to the circular summing, this operation can't be reversed or, as
> you've put it, it can't be "inverted".
>
> What you may achieve however, is to generate a radially symmetric
> image from a profile. If the profile is given analytically you can use
>
> "Process > Math > Macro"
>
> as it was suggested by Jerome Mutterer:
> <http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cros
> s-section/2379>
>
>  Here is his example macro using a shifted Gaussian profile:
>
> newImage( "Image from Profile", "8-bit black", 256, 256, 1 ); run(
> "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );
>
> HTH
>
> Herbie
>
> :::::::::::::::::::::::::::::::::::::::::::: Am 05.02.17 um 08:47
> schrieb Michael Elbaum:
>> Dear list,     I'm wondering if there's a plugin available to do
>> the "inverse" of the Radial Profile: given a theoretical curve I want
>> to simulate an image. thanks, Michael
>>
>> -- 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 image from radial profile

Michael Elbaum
Thanks Jeremy and Herbie!     off list the Polar Transform plugin was also recommended.
Best wishes,
Michael

Sent from my iPad

> On 8 בפבר׳ 2017, at 17:39, Jeremy Adler <[hidden email]> wrote:
>
> Dear All,
> A rather crude method would be to first turn the image into one where the distances from the designated centre of the circle are marked - a distance map from a single point.
> Then use a LUT to change the distances into the sequence of intensities that you want.
> LUTs are just lists of numbers, so they can be created and edited quite easily.
> The intensities/colours imposed by the LUT can then be made permanent.
> A limitation is that only 256 different intensities are available with a LUT - but the final image could always be smoothed to create intermediate values and Transform/Bin with differential x and y axis compression/stretch would create ovals.
>
> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Herbie
> Sent: den 7 februari 2017 20:30
> To: [hidden email]
> Subject: Re: create image from radial profile
>
> Dear Michael and all those who are interested!
>
> The approach that I should like to propose for the computation of the
>    "Radially Symmetric Function from its Profile"
> makes use of the
>    "Central Slice Theorem"
> of the Fourier calculus.^1
>
>
> Processing steps:
>
> 1.
> The horizontal 1D profile function is centered to a [ n * n ] image support.
>
> 2.
> The image is 2D Fourier-transformed which leads to the vertical projection of the 1D Fourier-transform of the profile.
>
> 3.
> Rotated versions of the resulting 2D Fourier-spectrum are summed.
> The angle increment must at least be [ 360 / (n * PI) ] and the rotations go from 0...180 deg.^2
>
> 4.
> The resulting sum of Fourier-spectra is then Fourier re-transformed and gives the desired radially symmetric function.
>
> The quality of the resulting radially symmetric image function can be improved by increasing the resolution of the Fourier-spectrum which is achieved by simply using a larger image support in step 1.
>
>
> The approach is well-suited for macro-implementations, because all time-consuming operations (ffts & rotations) are performed by core-plugins of ImageJ.
>
> Best
>
> Herbie
>
> _____________________
> ^1
> _Bracewell (1956)_
> <http://adsabs.harvard.edu/full/1956aujph...9..198b>
> _Glünder (1986)_
> <www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-1986-2>
> ^2
> _Herman G.T. (1980)_ "Image reconstruction from projections". Academic.
> _Platzer H. (1981)_ "Optical image processing". In: Oja E. and Simula O.
> (eds.) The second Scandinavian conference on image analysis. Pattern Recognition Society of Finland, Espoo/Finland, pp. 128-138.
> _Glünder (2013)_
> <www.gluender.de/Writings/WritingsTexts/HardText.html#Gl-2013-1>
>
> ::::::::::::::::::::::::::::::::::::::::::::
>> Am 05.02.17 um 16:08 schrieb Michael Elbaum:
>> Thanks Herbie,
>>
>> This is just what I was looking for, to generate a radially symmetric
>> image from a given profile. I have the profile only as a list, though,
>> rather than a function, so it should be interpolated from 1D on "x" to
>> the radius. I vaguely remember seeing something that can do this in
>> ImageJ, but might be imagining.
>>
>> best, Michael
>>
>> ________________________________________ From: ImageJ Interest Group
>> [[hidden email]] on behalf of Herbie [[hidden email]] Sent:
>> Sunday, February 05, 2017 14:41 To: [hidden email] Subject: Re:
>> create image from radial profile
>>
>> Dear Michael,
>>
>> the valuable ImageJ-plugin "Radial Profile" sums the image values on
>> concentric circles and displays the normalized sums as a function of
>> the radii of these circles. Consequently, the result is a
>> 1-dimensional curve with the radius as the abscissa.
>>
>> Due to the circular summing, this operation can't be reversed or, as
>> you've put it, it can't be "inverted".
>>
>> What you may achieve however, is to generate a radially symmetric
>> image from a profile. If the profile is given analytically you can use
>>
>> "Process > Math > Macro"
>>
>> as it was suggested by Jerome Mutterer:
>> <http://forum.imagej.net/t/image-generation-donut-with-a-gaussian-cros
>> s-section/2379>
>>
>> Here is his example macro using a shifted Gaussian profile:
>>
>> newImage( "Image from Profile", "8-bit black", 256, 256, 1 ); run(
>> "Macro...", "v=255*exp(-((d-50)*(d-50)/w)/2)" );
>>
>> HTH
>>
>> Herbie
>>
>> :::::::::::::::::::::::::::::::::::::::::::: Am 05.02.17 um 08:47
>> schrieb Michael Elbaum:
>>> Dear list,     I'm wondering if there's a plugin available to do
>>> the "inverse" of the Radial Profile: given a theoretical curve I want
>>> to simulate an image. thanks, Michael
>>>
>>> -- 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

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