Login  Register

Re: split channels and all files in a directory

Posted by Philip Ershler on Apr 07, 2011; 5:07pm
URL: http://imagej.273.s1.nabble.com/split-channels-and-all-files-in-a-directory-tp3685101p3685104.html

I'm sorry but I think the word "hate" is a bit strong. And for many, many people the macro language is perfectly acceptable. The ability to record a macro by saying "watch me" is a great asset. Besides, considering the price you paid for ImageJ makes any complaints such as this come off rather whiny.

Phil

On Apr 7, 2011, at 10:54 AM, Ramon Guirado wrote:

> Thanks for this macro, I think many people share the hate for imageJ macro
> language, indeed would be better to learn python instead.
> Anyway I think I can find all the commands I need in your macro, just it
> will require time to decipher what is what I need.
> Thanks!!
>
> ramon
>
> 2011/4/7 Carnë Draug <[hidden email]>
>
>> On 7 April 2011 15:04, Ramon Guirado <[hidden email]> wrote:
>>> Hi, I'm trying to write a macro able to open all the files in a
>> directory,
>>> split the channels of the images and analyze particles in this separated
>>> channels as well as the composite between some of them (they will be also
>>> binarized, etc...). I have just done small macros using the macro
>> recorder,
>>> so I don't know how to do it, I'm trying to get the identity of every
>> image
>>> in a directory and then I guess after the image calculator, I will have
>> to
>>> identify the new windows just created so they are processed as well, and
>>> then do that recursively, but I feel a little bit lost... which would be
>> the
>>> easiest way to proceed? by know I'll try to understand the macro posted
>>> by Carnë Draug..
>>>
>>> Thanks,
>>>
>>>
>>> ramon
>>
>> I wrote a macro some time ago that does a similar thing. It opens all
>> images, makes them composite, use one channel to find the nucleus
>> (DAPI stained), and the two other channels to analyze particles inside
>> the nucleus. I wrote it as macro and regret it, it's terribly
>> confusing code. I find the ImageJ macro language terribly frustating.
>> I should have bothered to learn Python to do it. Anyway, I pasted it
>> into pastebin
>>
>> http://pastebin.com/R5dPsyqM
>>
>> You'll also need the other functions I posted before (I place them in
>> macros/Library.txt so I don't have to bother copying into every
>> macro).
>>
>> Carnë
>>

Philip R. Ershler Ph.D.
University of Utah
Cardiovascular Research and Training Institute
95 South 2000 East
Salt Lake City, UT 84112-5000

phone: (801) 230-8771
alt ph: (801) 587-9528
fax: (801) 581-3128
e-mail: [hidden email]