Greetings,
When enlarged enough to where the voxel is clearly a square on the screen, the Roi.PointType of circle is located around the juncture of squares and not centered on the square. I suspect this in the upper left corner of the voxel. From reading the Roi class description it indicates that when subpixelresolution is turned on, the PointRoi should be centered on the center of the pixel. From reading the PointRoi.subPixelResolution(), it is always on. Thanks in advance, Fred -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Fred,
this sounds a bit like the behavior of some old ImageJ version. Since 1.52u, there is no "subpixel resolution" in the Plot options any more. If you manually create a roi up to 150% magnification, coordinates will be always integer. Then, for point rois, when zooming in, the marker will be displayed in the center of the pixel (I also tried with circle markers). If you create the point by clicking at 200% or higher zoom level, it will have subpixel resolution, so you can have non-integer coordinates. For PointRois created via a program with integer coordinates, the markers also appear centered at the pixel at high magnification. Javascript example: imp = IJ.openImage("http://wsr.imagej.net/images/blobs.gif"); roi = new PointRoi(10,10,"circle"); imp.setRoi(roi); imp.show(); You can see whether the coordinates are integer with Edit>Selection>Properties (shortcut y) and "List coordinates". If it does not behave as I have described, can you please create an example so I can see what goes wrong? Michael ________________________________________________________________ On 20.05.20 00:45, Fred Damen wrote: > Greetings, > > When enlarged enough to where the voxel is clearly a square on the screen, > the Roi.PointType of circle is located around the juncture of squares and > not centered on the square. I suspect this in the upper left corner of the > voxel. > > From reading the Roi class description it indicates that when > subpixelresolution is turned on, the PointRoi should be centered on the > center of the pixel. From reading the PointRoi.subPixelResolution(), it > is always on. > > Thanks in advance, > > Fred > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear list,
From the discussion about sub-pixel resolution I realised that Edit>Selection>Properties (shortcut y) has the option "List coordinates". However, if I add the selection to the ROI manager and use Properties from the ROI managers menu I get the same properties list as under Edit>Selection>Properties but without the option "List coordinates". If an selection is in the ROI manager Edit>Selection>Properties even uses the name of the ROI in the ROI manager as label. I had expected that these menus were the same. Best wishes Kees -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) <[hidden email]> wrote:
> > Dear list, > > From the discussion about sub-pixel resolution I realised that Edit>Selection>Properties (shortcut y) has the option "List coordinates". However, if I add the selection to the ROI manager and use Properties from the ROI managers menu I get the same properties list as under Edit>Selection>Properties but without the option "List coordinates". If an selection is in the ROI manager Edit>Selection>Properties even uses the name of the ROI in the ROI manager as label. I had expected that these menus were the same. Upgrade to the latest daily build (1.52b25) and the ROI Manager’s “Properties...” dialog will have a “List coordinates” option. -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Greetings,
On a slightly different topic, listing voxel values within a ROI. Is there already a way of doing this? I rarely need this. Although when I do, I resort to writing a plugin to copy the the values columnwise to the system clipboard and then paste into a spreadsheet to do some fancy stats. Side question: Can the P-value for the Student t-test be calculated in ImageJ without installing extra libraries? Possible issue: I have noticed today that if I try to copy an image to the System Clipboard, with a lot of memory used, it tends to work unreliably / illogically, i.e., what gets pasted in another application tends not to be what I just copied, and what gets pasted varies. Although if I click on the status bar to cause a garbage collection, to significantly reduce current memory usage before the copy, the copy/paste seems to work reliably. Thanks, Fred On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >> <[hidden email]> wrote: >> >> Dear list, >> >> From the discussion about sub-pixel resolution I realised that >> Edit>Selection>Properties (shortcut y) has the option "List >> coordinates". However, if I add the selection to the ROI manager and use >> Properties from the ROI managers menu I get the same properties list as >> under Edit>Selection>Properties but without the option "List >> coordinates". If an selection is in the ROI manager >> Edit>Selection>Properties even uses the name of the ROI in the ROI >> manager as label. I had expected that these menus were the same. > > Upgrade to the latest daily build (1.52b25) and the ROI Managerâs > âProperties...â dialog will have a âList coordinatesâ option. > > -wayne > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good day Fred!
Concerning: > Side question: Can the P-value for the Student t-test be calculated in > ImageJ without installing extra libraries? In a certain sense I don't understand this question. I'm sure you've searched the ImageJ User Guide for "t-test". <https://imagej.nih.gov/ij/docs/guide/index.html> So what do you expect as an answer to your question? Clueless Herbie :::::::::::::::::::::::::::::::::::::::: Am 20.05.20 um 23:43 schrieb Fred Damen: > Greetings, > > On a slightly different topic, listing voxel values within a ROI. Is > there already a way of doing this? I rarely need this. Although when I > do, I resort to writing a plugin to copy the the values columnwise to the > system clipboard and then paste into a spreadsheet to do some fancy stats. > > Side question: Can the P-value for the Student t-test be calculated in > ImageJ without installing extra libraries? > > Possible issue: I have noticed today that if I try to copy an image to > the System Clipboard, with a lot of memory used, it tends to work > unreliably / illogically, i.e., what gets pasted in another application > tends not to be what I just copied, and what gets pasted varies. Although > if I click on the status bar to cause a garbage collection, to > significantly reduce current memory usage before the copy, the copy/paste > seems to work reliably. > > Thanks, > > Fred > > > > On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>> <[hidden email]> wrote: >>> >>> Dear list, >>> >>> From the discussion about sub-pixel resolution I realised that >>> Edit>Selection>Properties (shortcut y) has the option "List >>> coordinates". However, if I add the selection to the ROI manager and use >>> Properties from the ROI managers menu I get the same properties list as >>> under Edit>Selection>Properties but without the option "List >>> coordinates". If an selection is in the ROI manager >>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>> manager as label. I had expected that these menus were the same. >> >> Upgrade to the latest daily build (1.52b25) and the ROI Manager’s >> “Properties...†dialog will have a “List coordinates†option. >> >> -wayne >> -- >> 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 |
In reply to this post by Fred Damen
Dear Fred,
for the listing of voxel values would the 3D ROI manager do the job https://imagejdocu.tudor.lu/plugin/stacks/3d_roi_manager/start? One of the features listed is "3D list of voxels". I think I only remember that it is a little slow.. Best wishes Kees ________________________________ Greetings, On a slightly different topic, listing voxel values within a ROI. Is there already a way of doing this? I rarely need this. Although when I do, I resort to writing a plugin to copy the the values columnwise to the system clipboard and then paste into a spreadsheet to do some fancy stats. Side question: Can the P-value for the Student t-test be calculated in ImageJ without installing extra libraries? Possible issue: I have noticed today that if I try to copy an image to the System Clipboard, with a lot of memory used, it tends to work unreliably / illogically, i.e., what gets pasted in another application tends not to be what I just copied, and what gets pasted varies. Although if I click on the status bar to cause a garbage collection, to significantly reduce current memory usage before the copy, the copy/paste seems to work reliably. Thanks, Fred On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >> <[hidden email]> wrote: >> >> Dear list, >> >> From the discussion about sub-pixel resolution I realised that >> Edit>Selection>Properties (shortcut y) has the option "List >> coordinates". However, if I add the selection to the ROI manager and use >> Properties from the ROI managers menu I get the same properties list as >> under Edit>Selection>Properties but without the option "List >> coordinates". If an selection is in the ROI manager >> Edit>Selection>Properties even uses the name of the ROI in the ROI >> manager as label. I had expected that these menus were the same. > > Upgrade to the latest daily build (1.52b25) and the ROI Manager’s > “Properties...� dialog will have a “List coordinates� option. > > -wayne > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C7515645144e6472b256508d7fd0f8eac%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637256115580115335&sdata=j5avnaICCqUbg4wap4UVRDDyk%2BnLUgILGF41lcDGDLU%3D&reserved=0 > -- ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C7515645144e6472b256508d7fd0f8eac%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637256115580115335&sdata=j5avnaICCqUbg4wap4UVRDDyk%2BnLUgILGF41lcDGDLU%3D&reserved=0 -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Dear Fred and Kees,
Yes there is a ListVoxels option in 3DManager that can be called with macro (use the Macro recorder). And yes it is a bit slow, I fixed the problem and it should be faster, wait for the next release. Best, Thomas On 21/5/20 7:52 pm, Straatman, Kees (Dr.) wrote: > Dear Fred, > > for the listing of voxel values would the 3D ROI manager do the job https://imagejdocu.tudor.lu/plugin/stacks/3d_roi_manager/start? One of the features listed is "3D list of voxels". I think I only remember that it is a little slow.. > > Best wishes > > Kees > > > > ________________________________ > > > Greetings, > > On a slightly different topic, listing voxel values within a ROI. Is > there already a way of doing this? I rarely need this. Although when I > do, I resort to writing a plugin to copy the the values columnwise to the > system clipboard and then paste into a spreadsheet to do some fancy stats. > > Side question: Can the P-value for the Student t-test be calculated in > ImageJ without installing extra libraries? > > Possible issue: I have noticed today that if I try to copy an image to > the System Clipboard, with a lot of memory used, it tends to work > unreliably / illogically, i.e., what gets pasted in another application > tends not to be what I just copied, and what gets pasted varies. Although > if I click on the status bar to cause a garbage collection, to > significantly reduce current memory usage before the copy, the copy/paste > seems to work reliably. > > Thanks, > > Fred > > > > On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>> <[hidden email]> wrote: >>> >>> Dear list, >>> >>> From the discussion about sub-pixel resolution I realised that >>> Edit>Selection>Properties (shortcut y) has the option "List >>> coordinates". However, if I add the selection to the ROI manager and use >>> Properties from the ROI managers menu I get the same properties list as >>> under Edit>Selection>Properties but without the option "List >>> coordinates". If an selection is in the ROI manager >>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>> manager as label. I had expected that these menus were the same. >> Upgrade to the latest daily build (1.52b25) and the ROI Manager’s >> “Properties...� dialog will have a “List coordinates� option. >> >> -wayne >> -- >> ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C7515645144e6472b256508d7fd0f8eac%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637256115580115335&sdata=j5avnaICCqUbg4wap4UVRDDyk%2BnLUgILGF41lcDGDLU%3D&reserved=0 >> > -- > ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&data=02%7C01%7Ckrs5%40leicester.ac.uk%7C7515645144e6472b256508d7fd0f8eac%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C637256115580115335&sdata=j5avnaICCqUbg4wap4UVRDDyk%2BnLUgILGF41lcDGDLU%3D&reserved=0 > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- /***************************************************************/ Thomas Boudier, Associate Professor Scholar, Institute of Molecular Biology, Academia Sinica, Taipei, Taiwan. /**************************************************************/ -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Herbie
Understood Fred,
if it is that easy, then here is my clear-cut answer: No. ImageJ is for image processing and provides only very basic statistical support. The same holds for graphics and other features that sometimes could be handy but that are not directly related to image processing. The t-test and more elaborated methods such as ANOVA are offered by many free and commercial packages that allow for easy data import. Depending on the OS, it may even be possible to have automatic transfer of data. I did this e.g. on Macs between ImageJ and Kaleidagraph using Applescript. I'm not perfectly sure but there should be even a more direct link between R and ImageJ. The problem with statistics is that you always need to do other tests with those you are interested in. At least the better packages provide this feature. E.g. when applying the t-test the data must be tested for Gaussian distribution before. If you follow this development that I judge essential, then you will realize that implementing even rather simple statistical methods requires much work and in fact they belong to their own universe. Even basic features such as variance / std aren't straight forward. In fact you need to know if you are dealing with a sample or the whole entity. I think we should stay with specialized software and not try to get all in one but with limited quality. Best regards Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 22.05.20 um 09:11 schrieb [hidden email]: > Greeting's Herbie, > > a) I've googled this issue every time I need to do get the p-value for the > t-test. Nothing that states that this can be done directly from ImageJ. > Plenty of questions on how to integrate stats packages like R, but nothing > that does not sounds like more of a headache then how I have been doing > it. Thus my question, not very confusing. > b) I did not know this particular document existed. > c) I just searched the PDF version of this document to Student (1 match > N/A), test (many matches N/A), t-test (nothing), p-value (nothing). > > What I expected as an answer is: > a) No responses because nobody is aware of a way to do it. > b) Library x has method y. > c) Someone who knows all says there aint no way. > > I use ImageJ on many different computers and if I have to play with the > config on each, I would much rather just do it the simple annoying way > that is easy for me. > > Fred > > On Thu, May 21, 2020 5:17 am, Herbie wrote: >> Good day Fred! >> >> Concerning: >> > Side question: Can the P-value for the Student t-test be calculated in >> > ImageJ without installing extra libraries? >> >> In a certain sense I don't understand this question. >> I'm sure you've searched the ImageJ User Guide for "t-test". >> <https://imagej.nih.gov/ij/docs/guide/index.html> >> So what do you expect as an answer to your question? >> >> Clueless >> >> Herbie >> >> :::::::::::::::::::::::::::::::::::::::: >> Am 20.05.20 um 23:43 schrieb Fred Damen: >>> Greetings, >>> >>> On a slightly different topic, listing voxel values within a ROI. Is >>> there already a way of doing this? I rarely need this. Although when I >>> do, I resort to writing a plugin to copy the the values columnwise to >>> the >>> system clipboard and then paste into a spreadsheet to do some fancy >>> stats. >>> >>> Side question: Can the P-value for the Student t-test be calculated in >>> ImageJ without installing extra libraries? >>> >>> Possible issue: I have noticed today that if I try to copy an image to >>> the System Clipboard, with a lot of memory used, it tends to work >>> unreliably / illogically, i.e., what gets pasted in another application >>> tends not to be what I just copied, and what gets pasted varies. >>> Although >>> if I click on the status bar to cause a garbage collection, to >>> significantly reduce current memory usage before the copy, the >>> copy/paste >>> seems to work reliably. >>> >>> Thanks, >>> >>> Fred >>> >>> >>> >>> On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>>>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>>>> <[hidden email]> wrote: >>>>> >>>>> Dear list, >>>>> >>>>> From the discussion about sub-pixel resolution I realised that >>>>> Edit>Selection>Properties (shortcut y) has the option "List >>>>> coordinates". However, if I add the selection to the ROI manager and >>>>> use >>>>> Properties from the ROI managers menu I get the same properties list >>>>> as >>>>> under Edit>Selection>Properties but without the option "List >>>>> coordinates". If an selection is in the ROI manager >>>>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>>>> manager as label. I had expected that these menus were the same. >>>> >>>> Upgrade to the latest daily build (1.52b25) and the ROI >>>> Manager’s >>>> “Properties...†dialog will have a “List >>>> coordinates†option. >>>> >>>> -wayne >>>> -- >>>> 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 |
In reply to this post by Fred Damen
> On May 20, 2020, at 5:43 PM, Fred Damen <[hidden email]> wrote:
> > Greetings, > > On a slightly different topic, listing voxel values within a ROI. Is > there already a way of doing this? The Analyze>Tools>Save XY Coordinates command saves the coordinates and values of pixels within an ROI on a 2D image. This is what the output looks like: X,Y,Value 233,38,76 232,39,159 233,39,129 231,40,158 232,40,129 -wayne > I rarely need this. Although when I > do, I resort to writing a plugin to copy the the values columnwise to the > system clipboard and then paste into a spreadsheet to do some fancy stats. > > Side question: Can the P-value for the Student t-test be calculated in > ImageJ without installing extra libraries? > > Possible issue: I have noticed today that if I try to copy an image to > the System Clipboard, with a lot of memory used, it tends to work > unreliably / illogically, i.e., what gets pasted in another application > tends not to be what I just copied, and what gets pasted varies. Although > if I click on the status bar to cause a garbage collection, to > significantly reduce current memory usage before the copy, the copy/paste > seems to work reliably. > > Thanks, > > Fred > > > > On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>> <[hidden email]> wrote: >>> >>> Dear list, >>> >>> From the discussion about sub-pixel resolution I realised that >>> Edit>Selection>Properties (shortcut y) has the option "List >>> coordinates". However, if I add the selection to the ROI manager and use >>> Properties from the ROI managers menu I get the same properties list as >>> under Edit>Selection>Properties but without the option "List >>> coordinates". If an selection is in the ROI manager >>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>> manager as label. I had expected that these menus were the same. >> >> Upgrade to the latest daily build (1.52b25) and the ROI Managerâs >> âProperties...â dialog will have a âList coordinatesâ option. >> >> -wayne -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Herbie
Greetings Herbie, et.al.,
First: I find it very fruitful at times to ask what most people consider stupid questions; sometimes you learn something that is not obvious, OR, what you already know is WRONG. Second: I asked two specific questions, How to get the values out of ImageJ so that I can do stats elsewhere?, and, Can the p-value for a specific stat be calculated without changing ImageJ, using a library that most likely is accepted as a valid calculator of said p-value? I in no way asked for ImageJ to become a stats package. Third: In the course of searching for other things that are not commonly known to be available within ImageJ I have noticed that Lavenberg-Marquart least squares fitting and Arbitrary/Non-2D-image Complex forward and reverse Fourier transforms are available in ImageJ, albeit for the FFT it is available only in FIJI and I at this point have only ventured into ImageJ1. Both of these tools are from respected and supported libraries. Is it that obnoxious to ponder if a stats library is secretly hidden somewhere in ImageJ1 loader path... Forth: I look at p-values from the perspective of 'Dam lies and statistics', albeit, try and publish without quoting a p-value. That said, it would be helpful, albeit not necessary, to see the p-value along side the data at times. Fifth: GIGO applies to everything. Fred PS: For something not in but accessible from ImageJ: https://imagej.net/Gnu_Plot On Fri, May 22, 2020 4:00 am, Herbie wrote: > Understood Fred, > > if it is that easy, then here is my clear-cut answer: No. > > ImageJ is for image processing and provides only very basic statistical > support. The same holds for graphics and other features that sometimes > could be handy but that are not directly related to image processing. > > The t-test and more elaborated methods such as ANOVA are offered by many > free and commercial packages that allow for easy data import. Depending > on the OS, it may even be possible to have automatic transfer of data. I > did this e.g. on Macs between ImageJ and Kaleidagraph using Applescript. > I'm not perfectly sure but there should be even a more direct link > between R and ImageJ. > > The problem with statistics is that you always need to do other tests > with those you are interested in. At least the better packages provide > this feature. E.g. when applying the t-test the data must be tested for > Gaussian distribution before. If you follow this development that I > judge essential, then you will realize that implementing even rather > simple statistical methods requires much work and in fact they belong to > their own universe. > > Even basic features such as variance / std aren't straight forward. In > fact you need to know if you are dealing with a sample or the whole > entity. I think we should stay with specialized software and not try to > get all in one but with limited quality. > > Best regards > > Herbie > > :::::::::::::::::::::::::::::::::::::::::::: > Am 22.05.20 um 09:11 schrieb [hidden email]: >> Greeting's Herbie, >> >> a) I've googled this issue every time I need to do get the p-value for >> the >> t-test. Nothing that states that this can be done directly from ImageJ. >> Plenty of questions on how to integrate stats packages like R, but >> nothing >> that does not sounds like more of a headache then how I have been doing >> it. Thus my question, not very confusing. >> b) I did not know this particular document existed. >> c) I just searched the PDF version of this document to Student (1 match >> N/A), test (many matches N/A), t-test (nothing), p-value (nothing). >> >> What I expected as an answer is: >> a) No responses because nobody is aware of a way to do it. >> b) Library x has method y. >> c) Someone who knows all says there aint no way. >> >> I use ImageJ on many different computers and if I have to play with the >> config on each, I would much rather just do it the simple annoying way >> that is easy for me. >> >> Fred >> >> On Thu, May 21, 2020 5:17 am, Herbie wrote: >>> Good day Fred! >>> >>> Concerning: >>> > Side question: Can the P-value for the Student t-test be calculated >>> in >>> > ImageJ without installing extra libraries? >>> >>> In a certain sense I don't understand this question. >>> I'm sure you've searched the ImageJ User Guide for "t-test". >>> <https://imagej.nih.gov/ij/docs/guide/index.html> >>> So what do you expect as an answer to your question? >>> >>> Clueless >>> >>> Herbie >>> >>> :::::::::::::::::::::::::::::::::::::::: >>> Am 20.05.20 um 23:43 schrieb Fred Damen: >>>> Greetings, >>>> >>>> On a slightly different topic, listing voxel values within a ROI. Is >>>> there already a way of doing this? I rarely need this. Although when >>>> I >>>> do, I resort to writing a plugin to copy the the values columnwise to >>>> the >>>> system clipboard and then paste into a spreadsheet to do some fancy >>>> stats. >>>> >>>> Side question: Can the P-value for the Student t-test be calculated in >>>> ImageJ without installing extra libraries? >>>> >>>> Possible issue: I have noticed today that if I try to copy an image >>>> to >>>> the System Clipboard, with a lot of memory used, it tends to work >>>> unreliably / illogically, i.e., what gets pasted in another >>>> application >>>> tends not to be what I just copied, and what gets pasted varies. >>>> Although >>>> if I click on the status bar to cause a garbage collection, to >>>> significantly reduce current memory usage before the copy, the >>>> copy/paste >>>> seems to work reliably. >>>> >>>> Thanks, >>>> >>>> Fred >>>> >>>> >>>> >>>> On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>>>>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>>>>> <[hidden email]> wrote: >>>>>> >>>>>> Dear list, >>>>>> >>>>>> From the discussion about sub-pixel resolution I realised that >>>>>> Edit>Selection>Properties (shortcut y) has the option "List >>>>>> coordinates". However, if I add the selection to the ROI manager and >>>>>> use >>>>>> Properties from the ROI managers menu I get the same properties list >>>>>> as >>>>>> under Edit>Selection>Properties but without the option "List >>>>>> coordinates". If an selection is in the ROI manager >>>>>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>>>>> manager as label. I had expected that these menus were the same. >>>>> >>>>> Upgrade to the latest daily build (1.52b25) and the ROI >>>>> Managerâââ‰â¢s >>>>> ââ∠âProperties...âââ¬Ã dialog will have a >>>>> ââ∠âList >>>>> coordinatesâââ¬Ã option. >>>>> >>>>> -wayne >>>>> -- >>>>> 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 |
Sorry Fred,
but I don't understand a word. 1. What do you mean by stupid questions? 2. You were asking: "Can the P-value for the Student t-test be calculated in ImageJ without installing extra libraries?" I answered: No. 3. You mean: Levenberg-Marquart, do you? You are right it is used for the ImageJ-1 curve fitting. "Non-2D-image Complex forward and reverse Fourier transforms [...]" ...are available for ImageJ-1 with the Plugin FFTJ (if you mean 3D). <https://imagej.nih.gov/ij/plugins/fftj.html> 4. p-values for what, t-test? No t-test, no p-values. 5. GIGO may sometimes apply to various things... Have success Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 22.05.20 um 21:40 schrieb [hidden email]: > Greetings Herbie, et.al., > > First: I find it very fruitful at times to ask what most people consider > stupid questions; sometimes you learn something that is not obvious, OR, > what you already know is WRONG. > > Second: I asked two specific questions, How to get the values out of > ImageJ so that I can do stats elsewhere?, and, Can the p-value for a > specific stat be calculated without changing ImageJ, using a library that > most likely is accepted as a valid calculator of said p-value? I in no way > asked for ImageJ to become a stats package. > > Third: In the course of searching for other things that are not commonly > known to be available within ImageJ I have noticed that Lavenberg-Marquart > least squares fitting and Arbitrary/Non-2D-image Complex forward and > reverse Fourier transforms are available in ImageJ, albeit for the FFT it > is available only in FIJI and I at this point have only ventured into > ImageJ1. Both of these tools are from respected and supported libraries. > Is it that obnoxious to ponder if a stats library is secretly hidden > somewhere in ImageJ1 loader path... > > Forth: I look at p-values from the perspective of 'Dam lies and > statistics', albeit, try and publish without quoting a p-value. That > said, it would be helpful, albeit not necessary, to see the p-value along > side the data at times. > > Fifth: GIGO applies to everything. > > Fred > > PS: For something not in but accessible from ImageJ: > https://imagej.net/Gnu_Plot > > On Fri, May 22, 2020 4:00 am, Herbie wrote: >> Understood Fred, >> >> if it is that easy, then here is my clear-cut answer: No. >> >> ImageJ is for image processing and provides only very basic statistical >> support. The same holds for graphics and other features that sometimes >> could be handy but that are not directly related to image processing. >> >> The t-test and more elaborated methods such as ANOVA are offered by many >> free and commercial packages that allow for easy data import. Depending >> on the OS, it may even be possible to have automatic transfer of data. I >> did this e.g. on Macs between ImageJ and Kaleidagraph using Applescript. >> I'm not perfectly sure but there should be even a more direct link >> between R and ImageJ. >> >> The problem with statistics is that you always need to do other tests >> with those you are interested in. At least the better packages provide >> this feature. E.g. when applying the t-test the data must be tested for >> Gaussian distribution before. If you follow this development that I >> judge essential, then you will realize that implementing even rather >> simple statistical methods requires much work and in fact they belong to >> their own universe. >> >> Even basic features such as variance / std aren't straight forward. In >> fact you need to know if you are dealing with a sample or the whole >> entity. I think we should stay with specialized software and not try to >> get all in one but with limited quality. >> >> Best regards >> >> Herbie >> >> :::::::::::::::::::::::::::::::::::::::::::: >> Am 22.05.20 um 09:11 schrieb [hidden email]: >>> Greeting's Herbie, >>> >>> a) I've googled this issue every time I need to do get the p-value for >>> the >>> t-test. Nothing that states that this can be done directly from ImageJ. >>> Plenty of questions on how to integrate stats packages like R, but >>> nothing >>> that does not sounds like more of a headache then how I have been doing >>> it. Thus my question, not very confusing. >>> b) I did not know this particular document existed. >>> c) I just searched the PDF version of this document to Student (1 match >>> N/A), test (many matches N/A), t-test (nothing), p-value (nothing). >>> >>> What I expected as an answer is: >>> a) No responses because nobody is aware of a way to do it. >>> b) Library x has method y. >>> c) Someone who knows all says there aint no way. >>> >>> I use ImageJ on many different computers and if I have to play with the >>> config on each, I would much rather just do it the simple annoying way >>> that is easy for me. >>> >>> Fred >>> >>> On Thu, May 21, 2020 5:17 am, Herbie wrote: >>>> Good day Fred! >>>> >>>> Concerning: >>>> > Side question: Can the P-value for the Student t-test be calculated >>>> in >>>> > ImageJ without installing extra libraries? >>>> >>>> In a certain sense I don't understand this question. >>>> I'm sure you've searched the ImageJ User Guide for "t-test". >>>> <https://imagej.nih.gov/ij/docs/guide/index.html> >>>> So what do you expect as an answer to your question? >>>> >>>> Clueless >>>> >>>> Herbie >>>> >>>> :::::::::::::::::::::::::::::::::::::::: >>>> Am 20.05.20 um 23:43 schrieb Fred Damen: >>>>> Greetings, >>>>> >>>>> On a slightly different topic, listing voxel values within a ROI. Is >>>>> there already a way of doing this? I rarely need this. Although when >>>>> I >>>>> do, I resort to writing a plugin to copy the the values columnwise to >>>>> the >>>>> system clipboard and then paste into a spreadsheet to do some fancy >>>>> stats. >>>>> >>>>> Side question: Can the P-value for the Student t-test be calculated in >>>>> ImageJ without installing extra libraries? >>>>> >>>>> Possible issue: I have noticed today that if I try to copy an image >>>>> to >>>>> the System Clipboard, with a lot of memory used, it tends to work >>>>> unreliably / illogically, i.e., what gets pasted in another >>>>> application >>>>> tends not to be what I just copied, and what gets pasted varies. >>>>> Although >>>>> if I click on the status bar to cause a garbage collection, to >>>>> significantly reduce current memory usage before the copy, the >>>>> copy/paste >>>>> seems to work reliably. >>>>> >>>>> Thanks, >>>>> >>>>> Fred >>>>> >>>>> >>>>> >>>>> On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>>>>>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>>>>>> <[hidden email]> wrote: >>>>>>> >>>>>>> Dear list, >>>>>>> >>>>>>> From the discussion about sub-pixel resolution I realised that >>>>>>> Edit>Selection>Properties (shortcut y) has the option "List >>>>>>> coordinates". However, if I add the selection to the ROI manager and >>>>>>> use >>>>>>> Properties from the ROI managers menu I get the same properties list >>>>>>> as >>>>>>> under Edit>Selection>Properties but without the option "List >>>>>>> coordinates". If an selection is in the ROI manager >>>>>>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>>>>>> manager as label. I had expected that these menus were the same. >>>>>> >>>>>> Upgrade to the latest daily build (1.52b25) and the ROI >>>>>> Manager’s >>>>>> “Properties...†dialog will have a >>>>>> “List >>>>>> coordinates†option. >>>>>> >>>>>> -wayne >>>>>> -- >>>>>> 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 |
Dear Fred,
To add on the answer of Herbie for your point 2, since ImageJ isn't a statistics software what you can have as option is to just rewrite the ad hoc equations for your needed statistical tests (albeit within these confinement times this could probably be a good training). An alternative option may be to use open source image analysis software ImageJ (https://imagej.nih.gov/ij/index.html) for acquiring the data from your pictures and then use the open source statistics software R (https://www.r-project.org) for running your needed statistical tests. And in order to interface both softwares you can use the ad hoc open source software Knime (https://www.knime.com). Have a nice week-end, Philippe Philippe CARL Laboratoire de Bioimagerie et Pathologies UMR 7021 CNRS - Université de Strasbourg Faculté de Pharmacie 74 route du Rhin 67401 ILLKIRCH Tel : +33(0)3 68 85 42 89 ----- Le 22 Mai 20, à 21:58, l16 [hidden email] a écrit : Sorry Fred, but I don't understand a word. 1. What do you mean by stupid questions? 2. You were asking: "Can the P-value for the Student t-test be calculated in ImageJ without installing extra libraries?" I answered: No. 3. You mean: Levenberg-Marquart, do you? You are right it is used for the ImageJ-1 curve fitting. "Non-2D-image Complex forward and reverse Fourier transforms [...]" ...are available for ImageJ-1 with the Plugin FFTJ (if you mean 3D). <https://imagej.nih.gov/ij/plugins/fftj.html> 4. p-values for what, t-test? No t-test, no p-values. 5. GIGO may sometimes apply to various things... Have success Herbie :::::::::::::::::::::::::::::::::::::::::::: Am 22.05.20 um 21:40 schrieb [hidden email]: > Greetings Herbie, et.al., > > First: I find it very fruitful at times to ask what most people consider > stupid questions; sometimes you learn something that is not obvious, OR, > what you already know is WRONG. > > Second: I asked two specific questions, How to get the values out of > ImageJ so that I can do stats elsewhere?, and, Can the p-value for a > specific stat be calculated without changing ImageJ, using a library that > most likely is accepted as a valid calculator of said p-value? I in no way > asked for ImageJ to become a stats package. > > Third: In the course of searching for other things that are not commonly > known to be available within ImageJ I have noticed that Lavenberg-Marquart > least squares fitting and Arbitrary/Non-2D-image Complex forward and > reverse Fourier transforms are available in ImageJ, albeit for the FFT it > is available only in FIJI and I at this point have only ventured into > ImageJ1. Both of these tools are from respected and supported libraries. > Is it that obnoxious to ponder if a stats library is secretly hidden > somewhere in ImageJ1 loader path... > > Forth: I look at p-values from the perspective of 'Dam lies and > statistics', albeit, try and publish without quoting a p-value. That > said, it would be helpful, albeit not necessary, to see the p-value along > side the data at times. > > Fifth: GIGO applies to everything. > > Fred > > PS: For something not in but accessible from ImageJ: > https://imagej.net/Gnu_Plot > > On Fri, May 22, 2020 4:00 am, Herbie wrote: >> Understood Fred, >> >> if it is that easy, then here is my clear-cut answer: No. >> >> ImageJ is for image processing and provides only very basic statistical >> support. The same holds for graphics and other features that sometimes >> could be handy but that are not directly related to image processing. >> >> The t-test and more elaborated methods such as ANOVA are offered by many >> free and commercial packages that allow for easy data import. Depending >> on the OS, it may even be possible to have automatic transfer of data. I >> did this e.g. on Macs between ImageJ and Kaleidagraph using Applescript. >> I'm not perfectly sure but there should be even a more direct link >> between R and ImageJ. >> >> The problem with statistics is that you always need to do other tests >> with those you are interested in. At least the better packages provide >> this feature. E.g. when applying the t-test the data must be tested for >> Gaussian distribution before. If you follow this development that I >> judge essential, then you will realize that implementing even rather >> simple statistical methods requires much work and in fact they belong to >> their own universe. >> >> Even basic features such as variance / std aren't straight forward. In >> fact you need to know if you are dealing with a sample or the whole >> entity. I think we should stay with specialized software and not try to >> get all in one but with limited quality. >> >> Best regards >> >> Herbie >> >> :::::::::::::::::::::::::::::::::::::::::::: >> Am 22.05.20 um 09:11 schrieb [hidden email]: >>> Greeting's Herbie, >>> >>> a) I've googled this issue every time I need to do get the p-value for >>> the >>> t-test. Nothing that states that this can be done directly from ImageJ. >>> Plenty of questions on how to integrate stats packages like R, but >>> nothing >>> that does not sounds like more of a headache then how I have been doing >>> it. Thus my question, not very confusing. >>> b) I did not know this particular document existed. >>> c) I just searched the PDF version of this document to Student (1 match >>> N/A), test (many matches N/A), t-test (nothing), p-value (nothing). >>> >>> What I expected as an answer is: >>> a) No responses because nobody is aware of a way to do it. >>> b) Library x has method y. >>> c) Someone who knows all says there aint no way. >>> >>> I use ImageJ on many different computers and if I have to play with the >>> config on each, I would much rather just do it the simple annoying way >>> that is easy for me. >>> >>> Fred >>> >>> On Thu, May 21, 2020 5:17 am, Herbie wrote: >>>> Good day Fred! >>>> >>>> Concerning: >>>> > Side question: Can the P-value for the Student t-test be calculated >>>> in >>>> > ImageJ without installing extra libraries? >>>> >>>> In a certain sense I don't understand this question. >>>> I'm sure you've searched the ImageJ User Guide for "t-test". >>>> <https://imagej.nih.gov/ij/docs/guide/index.html> >>>> So what do you expect as an answer to your question? >>>> >>>> Clueless >>>> >>>> Herbie >>>> >>>> :::::::::::::::::::::::::::::::::::::::: >>>> Am 20.05.20 um 23:43 schrieb Fred Damen: >>>>> Greetings, >>>>> >>>>> On a slightly different topic, listing voxel values within a ROI. Is >>>>> there already a way of doing this? I rarely need this. Although when >>>>> I >>>>> do, I resort to writing a plugin to copy the the values columnwise to >>>>> the >>>>> system clipboard and then paste into a spreadsheet to do some fancy >>>>> stats. >>>>> >>>>> Side question: Can the P-value for the Student t-test be calculated in >>>>> ImageJ without installing extra libraries? >>>>> >>>>> Possible issue: I have noticed today that if I try to copy an image >>>>> to >>>>> the System Clipboard, with a lot of memory used, it tends to work >>>>> unreliably / illogically, i.e., what gets pasted in another >>>>> application >>>>> tends not to be what I just copied, and what gets pasted varies. >>>>> Although >>>>> if I click on the status bar to cause a garbage collection, to >>>>> significantly reduce current memory usage before the copy, the >>>>> copy/paste >>>>> seems to work reliably. >>>>> >>>>> Thanks, >>>>> >>>>> Fred >>>>> >>>>> >>>>> >>>>> On Wed, May 20, 2020 12:41 pm, Wayne Rasband wrote: >>>>>>> On May 20, 2020, at 6:04 AM, Straatman, Kees (Dr.) >>>>>>> <[hidden email]> wrote: >>>>>>> >>>>>>> Dear list, >>>>>>> >>>>>>> From the discussion about sub-pixel resolution I realised that >>>>>>> Edit>Selection>Properties (shortcut y) has the option "List >>>>>>> coordinates". However, if I add the selection to the ROI manager and >>>>>>> use >>>>>>> Properties from the ROI managers menu I get the same properties list >>>>>>> as >>>>>>> under Edit>Selection>Properties but without the option "List >>>>>>> coordinates". If an selection is in the ROI manager >>>>>>> Edit>Selection>Properties even uses the name of the ROI in the ROI >>>>>>> manager as label. I had expected that these menus were the same. >>>>>> >>>>>> Upgrade to the latest daily build (1.52b25) and the ROI >>>>>> Manager’s >>>>>> “Properties...†dialog will have a >>>>>> “List >>>>>> coordinates†option. >>>>>> >>>>>> -wayne >>>>>> -- >>>>>> 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 |
In reply to this post by Fred Damen
Hi Fred, Concerning: > Third: In the course of searching for other things that are not commonly known to be available within ImageJ I have noticed that Lavenberg-Marquart least squares fitting... Just to clarify, the Curve Fitter (and the Minimizer) in ImageJ1 does not use Lavenberg-Marquart but the Nelder–Mead method. Lavenberg-Marquart would need a derivative; this is not necessarily available for general nonlinear fitting of arbitrary functions. Michael -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thanks Michael,
for this clarification. Several times I compared the IJ-fit to that of a Levenberg-Marquart implementation (KaleidaGraph) and the results were indistinguishable. Levenberg-Marquart usually works better with provided derivatives but also does without (using guesses and approximations*). Also see for example: "Numerical Recipes in C" 1992, pp.683-688. Best Herbie ____________________________________________ *From the KG-manual: "Specify Partials The algorithm that KaleidaGraph uses in calculating each iteration of the General curve fit requires evaluating the partial derivative of the function with respect to each parameter. If Specify Partials is not selected, KaleidaGraph numerically approximates the derivative.[...] The biggest advantage of specifying the partial derivatives is accuracy. The curve fit algorithm uses these partial derivatives to direct itself where to move after each iteration to find the best solution.[...] You can choose to specify only some of the partial derivatives, but not all of them. It is better to let KaleidaGraph approximate the partial instead of specifying the wrong derivative. If a partial derivative is missing, KaleidaGraph numerically approximates that partial derivative." ::::::::::::::::::::::::::::::::::::::::::::: Am 23.05.20 um 10:39 schrieb Schmid, Michael: > > Hi Fred, > > Concerning: >> Third: In the course of searching for other things that are not commonly > known to be available within ImageJ I have noticed that Lavenberg-Marquart > least squares fitting... > > Just to clarify, the Curve Fitter (and the Minimizer) in ImageJ1 does not use Lavenberg-Marquart but the Nelder–Mead method. > Lavenberg-Marquart would need a derivative; this is not necessarily available for general nonlinear fitting of arbitrary functions. > > Michael > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Michael Schmid
Hi Philippe,
as I wrote, the Minimizer of ImageJ1 uses the Nelder–Mead method, also known as polytope method. From the comments in Minimizer.java: Minimizer based on Nelder-Mead simplex method (also known as polytope method), including the 'outside contraction' as described in: J.C. Lagarias, J.A. Reeds, M.H. Wright, P. Wright: Convergence properties of the Nelder-Mead simplex algorithm in low dimensions. SIAM J. Optim. 9, 112-147 (1998). Differences w.r.t. this publication: - If outside contraction is rejected, instead of shrinking the whole simplex, an inside contraction is tried first. Own experiments show that this results in slightly better performance for some test functions (Perm, Mc Kinnon's function with tau=2, theta=6, Osborne1 curve-fitting problem). In most cases, there is no difference, however. * - This implementation does not include any 'ordering rules' in case of equal function values. * - When checking for convergence, a special iteration step may be performed, improving the best vertex of the simplex. The ImageJ Minimizer also uses re-initialization to avoid getting stuck in "curved narrow valleys", and by default it uses two minimization runs in parallel threads and checks the the minimum values are identical within the tolerance, otherwise, with the default parameters, it uses up to a total six attempts (single-threaded when fitting e.g. macro code, because the macro interpreter is not multi-threaded). All these additional measures might make it a bit more robust than other minimizers. Also, Nelder–Mead is a bit more robust than most other minimizers in case of strongly varying orders of magnitude of the different parameters. On the other hand, since Nelder–Mead does not use derivatives, or any other interpolation or extrapolation schemes, it is not very efficient for well-behaved systems. Concerning curve fitting, for most built-in functions, one or two fit parameters are eliminated by linear regression, which makes the fitting much more efficient than just plainly using the Nelder–Mead algorithm. Best, Michael ________________________________________ Hi Michael, How are you doing? I confirm completely that for the Levenberg-Marquart the derivatives are needed since I use the Levmar (http://users.ics.forth.gr/~lourakis/levmar/) library for a project coded in C++. But do you know what kind of algorithm is implemented within ImageJ? And is it more stable (i.e. powerful) than a Levenberg-Marquart algorithm? Take care, Philippe PS: Such answers is what I was referring to about your sharp answers... ----- Mail original ----- De: "Michael Schmid" <[hidden email]> À: "imagej" <[hidden email]> Envoyé: Samedi 23 Mai 2020 10:39:32 Objet: Re: List coordinates Hi Fred, Concerning: > Third: In the course of searching for other things that are not commonly known to be available within ImageJ I have noticed that Lavenberg-Marquart least squares fitting... Just to clarify, the Curve Fitter (and the Minimizer) in ImageJ1 does not use Lavenberg-Marquart but the Nelder–Mead method. Lavenberg-Marquart would need a derivative; this is not necessarily available for general nonlinear fitting of arbitrary functions. Michael -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Good evening Philippe and Michael,
I'm far from being an expert in non-linear regression or more general, in minimization / optimization, but there were times when I had to apply such techniques to real world problems (e.g. non-linear classifiers) beyond curve fitting. Here is a link to an interesting and extensive benchmark comparison: <https://docs.mantidproject.org/v3.7.1/concepts/FittingMinimizers.html> The used NIST data is interesting as well: <https://itl.nist.gov/div898/strd/nls/nls_main.shtml> In any case, an interesting topic. BTW Philippe, please read the footnote in my message. It contains a brief note that explains how the explicit specification of the partial derivatives can be avoided with the Levenberg-Marquart approach. It works surprisingly well, at least for the purpose of curve fitting. Greetings Herbie ::::::::::::::::::::::::::::::::::::::::::::: Am 23.05.20 um 20:09 schrieb Schmid, Michael: > Hi Philippe, > > as I wrote, the Minimizer of ImageJ1 uses the Nelder–Mead method, also known as polytope method. >>From the comments in Minimizer.java: > > Minimizer based on Nelder-Mead simplex method (also known as polytope method), including the 'outside contraction' as described in: > J.C. Lagarias, J.A. Reeds, M.H. Wright, P. Wright: > Convergence properties of the Nelder-Mead simplex algorithm in low dimensions. > SIAM J. Optim. 9, 112-147 (1998). > Differences w.r.t. this publication: > - If outside contraction is rejected, instead of shrinking the whole simplex, an inside contraction is tried first. Own experiments show that this results in slightly better performance for some test functions (Perm, Mc Kinnon's function with tau=2, theta=6, Osborne1 curve-fitting problem). In most cases, there is no difference, however. > * - This implementation does not include any 'ordering rules' in case of equal function values. > * - When checking for convergence, a special iteration step may be performed, improving the best vertex of the simplex. > > The ImageJ Minimizer also uses re-initialization to avoid getting stuck in "curved narrow valleys", and by default it uses two minimization runs in parallel threads and checks the the minimum values are identical within the tolerance, otherwise, with the default parameters, it uses up to a total six attempts (single-threaded when fitting e.g. macro code, because the macro interpreter is not multi-threaded). All these additional measures might make it a bit more robust than other minimizers. Also, Nelder–Mead is a bit more robust than most other minimizers in case of strongly varying orders of magnitude of the different parameters. > On the other hand, since Nelder–Mead does not use derivatives, or any other interpolation or extrapolation schemes, it is not very efficient for well-behaved systems. > > Concerning curve fitting, for most built-in functions, one or two fit parameters are eliminated by linear regression, which makes the fitting much more efficient than just plainly using the Nelder–Mead algorithm. > > Best, > > Michael > ________________________________________ > > Hi Michael, > How are you doing? > I confirm completely that for the Levenberg-Marquart the derivatives are needed since I use the Levmar (http://users.ics.forth.gr/~lourakis/levmar/) library for a project coded in C++. > But do you know what kind of algorithm is implemented within ImageJ? > And is it more stable (i.e. powerful) than a Levenberg-Marquart algorithm? > Take care, > Philippe > > PS: Such answers is what I was referring to about your sharp answers... > > ----- Mail original ----- > De: "Michael Schmid" <[hidden email]> > À: "imagej" <[hidden email]> > Envoyé: Samedi 23 Mai 2020 10:39:32 > Objet: Re: List coordinates > > Hi Fred, > > Concerning: >> Third: In the course of searching for other things that are not commonly > known to be available within ImageJ I have noticed that Lavenberg-Marquart > least squares fitting... > > Just to clarify, the Curve Fitter (and the Minimizer) in ImageJ1 does not use Lavenberg-Marquart but the Nelder–Mead method. > Lavenberg-Marquart would need a derivative; this is not necessarily available for general nonlinear fitting of arbitrary functions. > > 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 |
In reply to this post by Michael Schmid
Greetings,
Note: I never said, suggested, or even mentioned CurveFitter, or its Minimizer. I even went on to state that the functionality was 'from respected and supported libraries'. Sorry that I was not specific enough to include the term 'third party' in front of 'libraries'. And, isn't CurverFitter considered part of ImageJ? In the course of searching for something related to fitting in Java I came across some demo code on Github that showed how to call Apache's LM implementation from ImageJ; as this was from memory I had neglected to post details. I do not remember seeing reference to FIJI or having to install any libraries. In hindsight, and further investigation, it seems as this is probably only in FIJI, albeit there are many included libraries that I have no idea what they are, so I could be wrong. Sorry for troubling people with a stupid question. Depending on the LM implementation that you use, the derivatives can be calculated numerically, albeit, not as efficiently or accurately. See MATLAB lsqcurvefit. Fred On Sat, May 23, 2020 3:39 am, Schmid, Michael wrote: > > Hi Fred, > > Concerning: >> Third: In the course of searching for other things that are not commonly > known to be available within ImageJ I have noticed that Lavenberg-Marquart > least squares fitting... > > Just to clarify, the Curve Fitter (and the Minimizer) in ImageJ1 does not > use Lavenberg-Marquart but the NelderMead method. > Lavenberg-Marquart would need a derivative; this is not necessarily > available for general nonlinear fitting of arbitrary functions. > > Michael > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
In reply to this post by Herbie
Greetings Herbie,
Thanks for that link. The link that always shows up when I google 'imagej java fft' is the one that implements the Hartley transform. The link that you provided is a lot closer, although lacks what I need: a) It does not provide the ability, at least through the gui, to do a complex forward FFT, i.e., it only takes a single stack as input, apparently it assumes magnitude. The resultant k-space(re/im) stack is setup in a fashion that enables the complex inverse FFT. There may be some magic that can be performed to setup the image domain as per the resultant k-space domain and get a complex forward transform to be performed, although it is not apparent. There does not seem to be a way, though gui, to forward transform re,im k-space. MRI datasets, at least those used by MR Physicists, are complex. If I notice an artifact in my images (mag/pha or re/im) I would like to transform them to k-space and see if I can figure out the cause of the artifacts. b) FFTJ seems to insist on doing a 3D FFT. The majority of MRI datasets are a stack of slices, although easy to get around by creating single slice stacks. Also each direction in k-space is not the same and would be useful to transform each direction separately. The methods for doing 1D FFT are private, preventing this. So, thanks again for pointing me to this link. Although, there are other FFT implementations out there that fulfill these requirements. Unfortunately for me at the moment they are not available in my current chosen development environment. When the desire for a ...FFT transforms into a necessity, I will rectify my dilemma, until then... Fred On Fri, May 22, 2020 2:58 pm, Herbie wrote: ... > "Non-2D-image Complex forward and reverse Fourier transforms [...]" > ...are available for ImageJ-1 with the Plugin FFTJ (if you mean 3D). > <https://imagej.nih.gov/ij/plugins/fftj.html> ... -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Fred,
Have you looked at Bio7? It has R and ImageJ integrated so you should be able to run IJ code and process results through R. https://bio7.org/ Cheers Gabriel On Sunday, 24 May 2020 21:45:25 BST [hidden email] wrote: > Greetings Herbie, > > Thanks for that link. The link that always shows up when I google 'imagej > java fft' is the one that implements the Hartley transform. > > The link that you provided is a lot closer, although lacks what I need: > > a) It does not provide the ability, at least through the gui, to do a > complex forward FFT, i.e., it only takes a single stack as input, > apparently it assumes magnitude. The resultant k-space(re/im) stack is > setup in a fashion that enables the complex inverse FFT. There may be some > magic that can be performed to setup the image domain as per the resultant > k-space domain and get a complex forward transform to be performed, > although it is not apparent. There does not seem to be a way, though gui, > to forward transform re,im k-space. > > MRI datasets, at least those used by MR Physicists, are complex. If I > notice an artifact in my images (mag/pha or re/im) I would like to > transform them to k-space and see if I can figure out the cause of the > artifacts. > > b) FFTJ seems to insist on doing a 3D FFT. The majority of MRI datasets > are a stack of slices, although easy to get around by creating single > slice stacks. Also each direction in k-space is not the same and would be > useful to transform each direction separately. The methods for doing 1D > FFT are private, preventing this. > > So, thanks again for pointing me to this link. Although, there are other > FFT implementations out there that fulfill these requirements. > Unfortunately for me at the moment they are not available in my current > chosen development environment. When the desire for a ...FFT transforms > into a necessity, I will rectify my dilemma, until then... > > Fred > > On Fri, May 22, 2020 2:58 pm, Herbie wrote: > ... > > > "Non-2D-image Complex forward and reverse Fourier transforms [...]" > > ...are available for ImageJ-1 with the Plugin FFTJ (if you mean 3D). > > <https://imagej.nih.gov/ij/plugins/fftj.html> > > ... > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |