How to delete the last slide of multiple zstacks

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

How to delete the last slide of multiple zstacks

BrunoNP
Hello,

I have multiple zstacks (+100) opened at the same time in ImageJ and I need to delete the last slide of each stack (not all the stacks have the same number of slides).
It would take too much time to delete each manually, is there a way to delete the last slide of all the zstacks at once?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: How to delete the last slide of multiple zstacks

Cammer, Michael
With no error checking for images that are not Z series, perhaps this macro would work:

  for (i=1; i<=nImages; i++) {
    selectImage(i);
    setSlice(nSlices());
    run("Delete Slice");
  }

=========================================================================
 Michael Cammer, Microscopy Core & Skirball Institute, NYU Langone Medical Center
                      Cell:  914-309-3270     ** MY OFFICE HAS MOVED TO SKIRBALL 2nd FLOOR, Back right **
          http://ocs.med.nyu.edu/microscopy & http://microscopynotes.com/


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of BrunoNP
Sent: Tuesday, September 22, 2015 1:31 PM
To: [hidden email]
Subject: How to delete the last slide of multiple zstacks

Hello,

I have multiple zstacks (+100) opened at the same time in ImageJ and I need to delete the last slide of each stack (not all the stacks have the same number of slides).
It would take too much time to delete each manually, is there a way to delete the last slide of all the zstacks at once?

Thank you




--
View this message in context: http://imagej.1557.x6.nabble.com/How-to-delete-the-last-slide-of-multiple-zstacks-tp5014408.html
Sent from the ImageJ mailing list archive at Nabble.com.

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

------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================

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

Re: How to delete the last slide of multiple zstacks

BrunoNP
Do I run the code in "script"?
What language is it?
Reply | Threaded
Open this post in threaded view
|

Re: How to delete the last slide of multiple zstacks

Herbie
Bruno,

open a new text window:

  File > New > Text Window

paste the macro code and run the macro code

  Macros > Run Macro

That's all (but there are other ways: see the User Guide).

HTH

Herbie

:::::::::::::::::::::::::::::::::::::
Am 22.09.15 um 20:03 schrieb BrunoNP:

> Do I run the code in "script"?
> What language is it?
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/How-to-delete-the-last-slide-of-multiple-zstacks-tp5014408p5014411.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> 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: How to delete the last slide of multiple zstacks

BrunoNP
Thanks a lot. it works perfectly.

Do you guys have something similar to split all the opened stacks in 2 (stack splitter)?