obtaining results in a table

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

obtaining results in a table

donny008
hello,

i am working with image properties on imagej and wanted to obtain properties
like mean, min, max and std in a table. one problem is that standard
deviation (std) is not included in the macro  run("Measure") ??

function convert(format);
        dir1 = getDirectory("Choose Source Directory ");
    list = getFileList(dir1);
          //loop over the files in the source directory


for (i=0; i<list.length; i++)
        {
        showProgress(i+1, list.length);
    open(dir1+list[i]);
       run("Measure");
    setResult("Label", nResults-1, "+ getTitle");

        }

and this is the result i get

  mean        min    max
   154.764    30    246
    155.198    29    245
    155.508    30    245
    153.564    26    245
    142.277    30    245


But with the code i wanted to get the name of the file as the first column,
could someone help me please

thank you
--
Donny George
Reply | Threaded
Open this post in threaded view
|

Re: obtaining results in a table

AdamC
Hi Donny,

This should work

function convert(format);
         dir1 = getDirectory("Choose Source Directory ");
     list = getFileList(dir1);
           //loop over the files in the source directory


for (i=0; i<list.length; i++)
         {
         showProgress(i+1, list.length);
     open(dir1+list[i]);
        run("Measure");
        title=getTitle();
    setResult("Label", nResults, title);
        updateResults();
         }


adam

On 6 May 2009, at 23:18, Donny George wrote:

> hello,
>
> i am working with image properties on imagej and wanted to obtain  
> properties
> like mean, min, max and std in a table. one problem is that standard
> deviation (std) is not included in the macro  run("Measure") ??
>
> function convert(format);
>         dir1 = getDirectory("Choose Source Directory ");
>     list = getFileList(dir1);
>           //loop over the files in the source directory
>
>
> for (i=0; i<list.length; i++)
>         {
>         showProgress(i+1, list.length);
>     open(dir1+list[i]);
>        run("Measure");
>     setResult("Label", nResults-1, "+ getTitle");
>
>         }
>
> and this is the result i get
>
>   mean        min    max
>    154.764    30    246
>     155.198    29    245
>     155.508    30    245
>     153.564    26    245
>     142.277    30    245
>
>
> But with the code i wanted to get the name of the file as the first  
> column,
> could someone help me please
>
> thank you
> --
> Donny George

Dr Adam Cliffe
Research Fellow
Rørth Lab
Cell Migration Group
Temasek Lifescience Laboratory
1 Research Link
National University of Singapore
Singapore 117604

tel: (65) 6872 8406
fax: (65) 6872 7007
Reply | Threaded
Open this post in threaded view
|

Re: obtaining results in a table

Fabrice Senger
Adam Cliffe a écrit :

> Hi Donny,
>
> This should work
>
> function convert(format);
>         dir1 = getDirectory("Choose Source Directory ");
>     list = getFileList(dir1);
>           //loop over the files in the source directory
>
>
> for (i=0; i<list.length; i++)
>         {
>         showProgress(i+1, list.length);
>     open(dir1+list[i]);
>        run("Measure");
>     title=getTitle();
>        setResult("Label", nResults, title);
>     updateResults();
>         }
>
>
> adam
>
> On 6 May 2009, at 23:18, Donny George wrote:
>
>> hello,
>>
>> i am working with image properties on imagej and wanted to obtain
>> properties
>> like mean, min, max and std in a table. one problem is that standard
>> deviation (std) is not included in the macro  run("Measure") ??
>>
>> function convert(format);
>>         dir1 = getDirectory("Choose Source Directory ");
>>     list = getFileList(dir1);
>>           //loop over the files in the source directory
>>
>>
>> for (i=0; i<list.length; i++)
>>         {
>>         showProgress(i+1, list.length);
>>     open(dir1+list[i]);
>>        run("Measure");
>>     setResult("Label", nResults-1, "+ getTitle");
>>
>>         }
>>
>> and this is the result i get
>>
>>   mean        min    max
>>    154.764    30    246
>>     155.198    29    245
>>     155.508    30    245
>>     153.564    26    245
>>     142.277    30    245
>>
>>
>> But with the code i wanted to get the name of the file as the first
>> column,
>> could someone help me please
>>
>> thank you
>> --
>> Donny George
>
> Dr Adam Cliffe
> Research Fellow
> Rørth Lab
> Cell Migration Group
> Temasek Lifescience Laboratory
> 1 Research Link
> National University of Singapore
> Singapore 117604
>
> tel: (65) 6872 8406
> fax: (65) 6872 7007
Hum,

it seems you should set measurements before..see "Analyze"..."Set
Measurments"...

Fabrice.

--
Senger Fabrice
Reply | Threaded
Open this post in threaded view
|

Re: obtaining results in a table

donny008
Hello cliff

thankyou for the help. now it does work great.

now i will just to make more experiments with them :)

thankyou again

don







On Thu, May 7, 2009 at 10:12 AM, Senger Fabrice <
[hidden email]> wrote:

> Adam Cliffe a écrit :
>
>  Hi Donny,
>>
>> This should work
>>
>> function convert(format);
>>        dir1 = getDirectory("Choose Source Directory ");
>>    list = getFileList(dir1);
>>          //loop over the files in the source directory
>>
>>
>> for (i=0; i<list.length; i++)
>>        {
>>        showProgress(i+1, list.length);
>>    open(dir1+list[i]);
>>       run("Measure");
>>    title=getTitle();
>>       setResult("Label", nResults, title);
>>    updateResults();
>>        }
>>
>>
>> adam
>>
>> On 6 May 2009, at 23:18, Donny George wrote:
>>
>>  hello,
>>>
>>> i am working with image properties on imagej and wanted to obtain
>>> properties
>>> like mean, min, max and std in a table. one problem is that standard
>>> deviation (std) is not included in the macro  run("Measure") ??
>>>
>>> function convert(format);
>>>        dir1 = getDirectory("Choose Source Directory ");
>>>    list = getFileList(dir1);
>>>          //loop over the files in the source directory
>>>
>>>
>>> for (i=0; i<list.length; i++)
>>>        {
>>>        showProgress(i+1, list.length);
>>>    open(dir1+list[i]);
>>>       run("Measure");
>>>    setResult("Label", nResults-1, "+ getTitle");
>>>
>>>        }
>>>
>>> and this is the result i get
>>>
>>>  mean        min    max
>>>   154.764    30    246
>>>    155.198    29    245
>>>    155.508    30    245
>>>    153.564    26    245
>>>    142.277    30    245
>>>
>>>
>>> But with the code i wanted to get the name of the file as the first
>>> column,
>>> could someone help me please
>>>
>>> thank you
>>> --
>>> Donny George
>>>
>>
>> Dr Adam Cliffe
>> Research Fellow
>> Rørth Lab
>> Cell Migration Group
>> Temasek Lifescience Laboratory
>> 1 Research Link
>> National University of Singapore
>> Singapore 117604
>>
>> tel: (65) 6872 8406
>> fax: (65) 6872 7007
>>
> Hum,
>
> it seems you should set measurements before..see "Analyze"..."Set
> Measurments"...
>
> Fabrice.
>
> --
> Senger Fabrice
>



--
Donny George
Reply | Threaded
Open this post in threaded view
|

Re: obtaining results in a table

donny008
In reply to this post by AdamC
hey cliffe

i used this code

run("Measure");
    title=getTitle();
           setResult("Label", nResults-1, title);
          updateResults();

but since i want to run this like 2 or 3 times during my experiment, i would
like to add something like

setResult("Label", nResults-1, "Modified" title);
and this doesnt work. would there be another format ???


thankyou again


don


On Thu, May 7, 2009 at 6:44 AM, Adam Cliffe <[hidden email]> wrote:

> Hi Donny,
>
> This should work
>
> function convert(format);
>        dir1 = getDirectory("Choose Source Directory ");
>    list = getFileList(dir1);
>          //loop over the files in the source directory
>
>
> for (i=0; i<list.length; i++)
>        {
>        showProgress(i+1, list.length);
>    open(dir1+list[i]);
>       run("Measure");
>        title=getTitle();
>        setResult("Label", nResults, title);
>        updateResults();
>        }
>
>
> adam
>
>
> On 6 May 2009, at 23:18, Donny George wrote:
>
>  hello,
>>
>> i am working with image properties on imagej and wanted to obtain
>> properties
>> like mean, min, max and std in a table. one problem is that standard
>> deviation (std) is not included in the macro  run("Measure") ??
>>
>> function convert(format);
>>        dir1 = getDirectory("Choose Source Directory ");
>>    list = getFileList(dir1);
>>          //loop over the files in the source directory
>>
>>
>> for (i=0; i<list.length; i++)
>>        {
>>        showProgress(i+1, list.length);
>>    open(dir1+list[i]);
>>       run("Measure");
>>    setResult("Label", nResults-1, "+ getTitle");
>>
>>        }
>>
>> and this is the result i get
>>
>>  mean        min    max
>>   154.764    30    246
>>    155.198    29    245
>>    155.508    30    245
>>    153.564    26    245
>>    142.277    30    245
>>
>>
>> But with the code i wanted to get the name of the file as the first
>> column,
>> could someone help me please
>>
>> thank you
>> --
>> Donny George
>>
>
> Dr Adam Cliffe
> Research Fellow
> Rørth Lab
> Cell Migration Group
> Temasek Lifescience Laboratory
> 1 Research Link
> National University of Singapore
> Singapore 117604
>
> tel: (65) 6872 8406
> fax: (65) 6872 7007
>



--
Donny George