fastest way to identify empty image

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

fastest way to identify empty image

Lars Damgaard
Hi,

I have a large sequence of images taken as timelapse in combination with z-stacking (on a Zeiss microscope).
Occasionally, the system could not take all the z-images within the timelapse interval, and this results in a number of my images being empty/black.
I would like to identify these in the folder and delete them using a macro. I think the Measure command could help, as it would give 0,0,0 for Mean, Min, and Max. However, I am not sure how to best get a handle of individual images in a folder. I could open a subset of one using the Import/image Sequence and examine it with Measure, but then how to delete it if it turns out to be black?
Any suggestions?

Best, Lars

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

Re: fastest way to identify empty image

dscho
Hi Lars,

On Fri, 13 Jun 2014, Lars Damgaard wrote:

> Occasionally, the system could not take all the z-images within the
> timelapse interval, and this results in a number of my images being
> empty/black.
>
> I would like to identify these in the folder and delete them using a macro.

You probably want to use the histMin and histMax values obtained by the
getHistogram(values, counts, nBins, histMin, histMax) function. A quick
test will show whether you have to duplicate the current slice before you
do that, or whether the function only operates on the current slice to
begin with.

Ciao,
Johannes

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

Re: fastest way to identify empty image

dscho
Hi Lars,

it might come as a surprise to you that I am not always at your disposal
;-)

There are many more good reasons to avoid taking discussions such as the
current one private, the most important one that you cut yourself off of
the many other subscribers of the mailing list.

Therefore, I re-Cc:ed the list.

On Mon, 16 Jun 2014, Lars Riis Damgaard wrote:

> I was hoping to avoid opening the image graphically in ImageJ with the
> time overhead I assume is associated with that.

I never meant to imply that you have to load the files "graphically". A
simple setBatchMode(true) before the loop opening the images (and closing
them, to avoid running out of memory!) makes things efficient. Sorry for
failing to mention that in my first reply.

Ciao,
Johannes

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

Re: fastest way to identify empty image

Lars Damgaard
Ah - I will try to remember to 'Reply all' in the future. I am a bit new to this forum (great job guys!) as well as to setBatchMode() which I will read up on now.
Thanks, Lars

-----Original Message-----
From: Johannes Schindelin [mailto:[hidden email]]
Sent: 17. juni 2014 03:41
To: Lars Riis Damgaard
Cc: [hidden email]
Subject: RE: fastest way to identify empty image

Hi Lars,

it might come as a surprise to you that I am not always at your disposal
;-)

There are many more good reasons to avoid taking discussions such as the current one private, the most important one that you cut yourself off of the many other subscribers of the mailing list.

Therefore, I re-Cc:ed the list.

On Mon, 16 Jun 2014, Lars Riis Damgaard wrote:

> I was hoping to avoid opening the image graphically in ImageJ with the
> time overhead I assume is associated with that.

I never meant to imply that you have to load the files "graphically". A simple setBatchMode(true) before the loop opening the images (and closing them, to avoid running out of memory!) makes things efficient. Sorry for failing to mention that in my first reply.

Ciao,
Johannes

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