3D - stacks - removing 2D objects

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

3D - stacks - removing 2D objects

henstridge
Hey,
I have image stacks containing 10-30 slices, which have been thresholded and altered to 8bit files.
I would like to generate a stack from this which only contains the objects that appear in at least 2 consecutive stacks, because objects in a single slice represent background rubbish.
Does anyone know how i could batch process lots of stacks, removing any objects found on a single plane?
Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: 3D - stacks - removing 2D objects

Thomas Boudier-3
Hi,

Using 3Dmanager you can write a macro that should look like this :


// open your segmented image (should be labelled)
run("3D Manager");
Ext.Manager3D_AddImage();
Ext.Manager3D_Count(nb);
for(i=nb-1;i>=0;i--){
     Ext.Manager3D_Bounding3D(i,x0,x1,y0,y1,z0,z1);
     if((z1-z0)==1) {
         Ext.Manager3D_Select(i);
         Ext.Manager3D_GetName(i, name);
         Ext.Manager3D_FillStack(0, 0, 0);
         Ext.Manager3D_Delete();
         IJ.log("Object "+name+" was erased");
     }
}

http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_roi_manager:start

Best,

Thomas


On 22/04/15 00:04, henstridge wrote:

> Hey,
> I have image stacks containing 10-30 slices, which have been thresholded and
> altered to 8bit files.
> I would like to generate a stack from this which only contains the objects
> that appear in at least 2 consecutive stacks, because objects in a single
> slice represent background rubbish.
> Does anyone know how i could batch process lots of stacks, removing any
> objects found on a single plane?
> Cheers!
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/3D-stacks-removing-2D-objects-tp5012555.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
   /***************************************************************/
      Thomas Boudier, Associate Professor, UPMC,
      Université Pierre et Marie Curie, Paris, France.
      BioInformatics Institute (BII)/IPAL, Singapore.
/**************************************************************/

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

Re: 3D - stacks - removing 2D objects

henstridge
Dear Thomas,

All I can seem to do with the macro you mentioned is to open the 3D ROI Manager…it doesn’t run anything else in terms of removing unwanted single-plane pixels.

Any advice?

Thanks for your help!

Cheers,

Chris

From: "Thomas Boudier-3 [via ImageJ]" <[hidden email]>
Date: Wednesday, 22 April 2015 04:00
To: Chris Henstridge <[hidden email]>
Subject: Re: 3D - stacks - removing 2D objects

Hi,

Using 3Dmanager you can write a macro that should look like this :


// open your segmented image (should be labelled)
run("3D Manager");
Ext.Manager3D_AddImage();
Ext.Manager3D_Count(nb);
for(i=nb-1;i>=0;i--){
     Ext.Manager3D_Bounding3D(i,x0,x1,y0,y1,z0,z1);
     if((z1-z0)==1) {
         Ext.Manager3D_Select(i);
         Ext.Manager3D_GetName(i, name);
         Ext.Manager3D_FillStack(0, 0, 0);
         Ext.Manager3D_Delete();
         IJ.log("Object "+name+" was erased");
     }
}

http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_roi_manager:start

Best,

Thomas


On 22/04/15 00:04, henstridge wrote:

> Hey,
> I have image stacks containing 10-30 slices, which have been thresholded and
> altered to 8bit files.
> I would like to generate a stack from this which only contains the objects
> that appear in at least 2 consecutive stacks, because objects in a single
> slice represent background rubbish.
> Does anyone know how i could batch process lots of stacks, removing any
> objects found on a single plane?
> Cheers!
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/3D-stacks-removing-2D-objects-tp5012555.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
   /***************************************************************/
      Thomas Boudier, Associate Professor, UPMC,
      Université Pierre et Marie Curie, Paris, France.
      BioInformatics Institute (BII)/IPAL, Singapore.
/**************************************************************/

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



If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/3D-stacks-removing-2D-objects-tp5012555p5012562.html
To unsubscribe from 3D - stacks - removing 2D objects, click here.
NAML

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.