Login  Register

How to split image?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

How to split image?

Ye Chen
Hello,

Is there any  function or plugin in ImageJ available to split one image
into half from the middle? For example, if I have an image 512 by 512, I
need to split this image from the middle to get another two new images
which should be 256 by 512?

Thanks
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: How to split image?

ctrueden
Hi,

Such tasks are exactly what macros are for. Using the Macro Recorder
(Plugins -> Macros -> Record) together with the Built-in Macro Functions
list (http://rsb.info.nih.gov/ij/developer/macro/functions.html), I created
the following macro that does what you ask:

makeRectangle(0, 0, getWidth()/2, getHeight());
run("Copy");
run("Make Inverse");
run("Crop");
run("Internal Clipboard");

-Curtis

On 7/28/06, Ye Chen <[hidden email]> wrote:

>
> Hello,
>
> Is there any  function or plugin in ImageJ available to split one image
> into half from the middle? For example, if I have an image 512 by 512, I
> need to split this image from the middle to get another two new images
> which should be 256 by 512?
>
> Thanks
>
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: How to split image?

Nico Stuurman-4
Or use the plugin OI_cut_RGBmerge
(http://valelab.ucsf.edu/~nico/ijplugins/OI_cut_RGBmerge.html) which
will also work on stacks and give you a Red-Green overlay of the two
halfs.

Nico

On Jul 28, 2006, at 10:16 AM, Curtis Rueden wrote:

> Such tasks are exactly what macros are for. Using the Macro Recorder
> (Plugins -> Macros -> Record) together with the Built-in Macro
> Functions
> list (http://rsb.info.nih.gov/ij/developer/macro/functions.html), I
> created
> the following macro that does what you ask:
>
> makeRectangle(0, 0, getWidth()/2, getHeight());
> run("Copy");
> run("Make Inverse");
> run("Crop");
> run("Internal Clipboard");
>
> -Curtis
>
> On 7/28/06, Ye Chen <[hidden email]> wrote:
>>
>> Hello,
>>
>> Is there any  function or plugin in ImageJ available to split one
>> image
>> into half from the middle? For example, if I have an image 512 by
>> 512, I
>> need to split this image from the middle to get another two new images
>> which should be 256 by 512?
>>
>> Thanks
>>
>
>
Vale Lab
HHMI / Dept. of Cellular and Molecular Pharmacology
University of California, San Francisco
Genentech Hall, Room N316
600 16th street

For mail:
San Francisco, CA 94143-2200

For deliveries:
San Francisco, CA 94158

email: [hidden email]
phone: (415) 514-3927
fax: (415) 476-5233
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

how to combine multiple objects into one

Michael Ji
hi there,

I am new in ImageJ and now working on tracking vehicle
object from video.

One difficulty I met is: one vehicle might show as
multiple objects (very closed each other) as I use
ParticleAnalyzer.

I am thinking to change code to automatically combine
objects based on their locations.

I wonder if there is existing similar concept/tool in
ImageJ. Sorry if this question is silly.

thanks your time,

Michael,

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com