Hélio A. Miot
> There are 8 messages totalling 444 lines in this issue.
>
> Topics of the day:
>
> 1. Segmentation of granular "stuff"
> 2. Information from Macro (3)
> 3. stack threshold
> 4. ImageJ interaction: ROI Manager etc. (2)
> 5. ImageJ undo notification
>
> ----------------------------------------------------------------------
>
> Date: Mon, 9 Jul 2007 14:29:15 +0200
> From: Michael Schmid <
[hidden email]>
> Subject: Re: Segmentation of granular "stuff"
>
> Hi Jolien,
>
> first concerning the uploaded images - the blanks in the filenames
> should be written "%20" in URLs. So, e.g., it is
>
> www.waisman.wisc.edu/cmn/mutant%20high%20load.tif
>
> Concerning faint images: There are plugins that may solve the
> problem, e.g. the Stack NOrmalizer
>
http://rsb.info.nih.gov/ij/plugins/normalizer.html> and the Background Subtraction and Image Normalization plugin
>
http://rsb.info.nih.gov/ij/plugins/normalize.html>
> Another way to do it might be saturating a small percentage
> of the pixels (Brightness&Contrast/Auto) and applying this as
> new grayscale (8-bit images only). The Macro Recorder will show
> you how this translates into macro code.
>
> If some images don't have the bright granular "stuff" at all,
> you may have to analyze at the histogram, e.g. determine the
> "mode" (grayvalue of the highest peak, usually some kind of
> background) and draw your conclusions from that (maybe divide
> by some value proportional to the "mode")
>
> Michael
> ________________________________________________________________
>
> On 6 Jul 2007, at 20:42, Jolien Connor wrote:
>
>> Hi,
>>
>> I am trying to do something similar to what many try
>> to do with thresholding -- find a way for the software
>> to pick out my pixels of interest away from the
>> background. In my case, it is granular "stuff" that
>> are intracellular inclusions in the brain. We have
>> many image montages taken of mouse brain sections and
>> we are trying to quantitate the percentage of specific
>> brain regions occupied by the inclusions (percent
>> volume). Some of the monochrome images are here:
>>
>> www.waisman.wisc.edu/cmn/mutant high load.tif
>> www.waisman.wisc.edu/cmn/mutant high load and
>> faint.tif
>> www.waisman.wisc.edu/cmn/mutant low load and faint.tif
>> www.waisman.wisc.edu/cmn/control.tif
>>
>> They are very large since they are montages; contact
>> me at
[hidden email] if you want them and
>> can't get them.
>>
>> If you look at the pictures of the mutants compared
>> with the control, you can see what they are -- the
>> bright granular stuff all over the place. Cells that
>> contain the inclusions sometimes have processes that
>> show up, and we only want to pick out the brightest,
>> most granular stuff, which are the inclusions. We
>> want a method that can tell the difference between
>> mutants and controls, as well as between high load
>> mutants and low load mutants (lots of them versus just
>> a few).
>>
>> The biggest problem right now seems to be that some of
>> our pictures are faint, possibly because the stain
>> weakened, our mercury bulb Atto Arc controller is
>> dying, or some other reason. As humans, we can still
>> pick them out, but we don't have a thresholding
>> algorithm that can handle this problems.
>>
>> We have been using the Subtract Background function,
>> then thresholding the image, and can't get consistent
>> results. We use a brightfield image that lines up
>> with each monochrome image to trace our regions, then
>> have ImageJ calculate the % Area occupied by pixels
>> above threshold. There's no threshold we could pick
>> that would correctly differentiate between controls,
>> low load mutants and high load mutants. Any ideas?
>>
>> Thanks,
>>
>> Jolien Connor
>> University of Wisconsin
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 14:32:27 +0200
> From: "Holmes, Charlotte" <
[hidden email]>
> Subject: Information from Macro
>
> Hi
>
> I was wondering if there was an easy way for a plugin to get information
> from a macro?
>
> I have an old macro I use to put a grid on an image. I have now
> developed a plugin to help analyse the image with the grid on it however
> to go forward I really need the locations of the grid points.
> I could to this within the plugin but it would be a lot of work when I
> have the macro there with the information in it.
>
> Thanks
> Lottie
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 14:55:01 +0200
> From: Michael Schmid <
[hidden email]>
> Subject: Re: Information from Macro
>
> Hi Charlotte,
>
> if the macro calls the plugin, you could simply use the
> GenericDialog in the plugin, and pass the values as parameters
> (run the plugin manually and use Macro>Record to see how to do
> this).
>
> In case your macro does not call the plugin, you can save the
> data as global variables (use the "var" macro statement) and
> make a wrapper macro for the plugin that calls the plugin with
> these variables passed to the GenericDialog.
>
> Otherwise, you have to store the values somewhere else, e.g.
> with macro function setMetadata into the ImagePlus, and use
> String metadata = (String)imp.getProperty("Info");
> for non-stack images or
> String metadata = imp.getStack().getSliceLabel(imp.getCurrentSlice
> ());
> for stacks.
> Of course, you can also write the data into a file with a
> fixed name and read the file in the plugin.
> A disadvantage of these ways is that you will have to decode
> strings to get numbers in your plugin.
>
> Michael
> ________________________________________________________________
>
> On 9 Jul 2007, at 14:32, Holmes, Charlotte wrote:
>
>> Hi
>>
>> I was wondering if there was an easy way for a plugin to get
>> information
>> from a macro?
>>
>> I have an old macro I use to put a grid on an image. I have now
>> developed a plugin to help analyse the image with the grid on it
>> however
>> to go forward I really need the locations of the grid points.
>> I could to this within the plugin but it would be a lot of work when I
>> have the macro there with the information in it.
>>
>> Thanks
>> Lottie
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 08:55:26 -0400
> From: Ben Tupper <
[hidden email]>
> Subject: Re: Information from Macro
>
> On Jul 9, 2007, at 08:32 AM, Holmes, Charlotte wrote:
>
>> Hi
>>
>> I was wondering if there was an easy way for a plugin to get
>> information
>> from a macro?
>>
>> I have an old macro I use to put a grid on an image. I have now
>> developed a plugin to help analyse the image with the grid on it
>> however
>> to go forward I really need the locations of the grid points.
>> I could to this within the plugin but it would be a lot of work when I
>> have the macro there with the information in it.
>
>
> Hello,
>
> You might want to look at IJ.runMacro() and IJ.runMacroFile(). Each
> of these will run the macro you specify, deliver arguments (as
> String) to the macro, and return a String value from the macro to the
> calling plugin. I use this a lot with arguments (and return values)
> concatenated into a single string delimited by the "\n" newline
> character. I often use the first line of the argument for processing
> flags - like if I want the macro to run in batch mode, etc. If I
> need a number of processing flags in the first line, I concatenate
> those with tabs or commas.
>
> Here is a snippet from a macro that is called by a plugin....
>
>> arg = split(getArgument(),"\n");//split all the records, the first
>> of which holds processing info
>> pi = 3.141593;
>> // get the first line of flags etc. The first line has booleans,
>> filepaths,
>> // numbers etc. in tab-delimited fields
>> s = split(arg[0], "\t");
>> doVerbose = startsWith(s[0], "true");
>> doBatchMode = startsWith(s[1], "true");
>> doEnhance = startsWith(s[2], "true");
>> doScalebar = startsWith(s[3], "true");
>> cal = parseFloat(s[4]);
>> name = s[5];
>> dir = s[6];
>> maskDir = s[7];
>> doMask = !(startsWith(maskDir, "noMask"));
>> outlineDir = s[8];
>> doOutline = !(startsWith(outlineDir,"noOutline"));
>> distNN = s[9];
>> thresh = s[10];
>> closeHoles = s[11];
>> lightOrDark = s[12];
>> minSize = pow(s[13]/2.,2) * pi; //convert minESD to minArea
>> maxSize= pow(s[14]/2., 2) * pi; //convert maxESD to maxArea
>> slice = parseInt(s[s.length-1]);
>>
>> n = arg.length-1;// the number of records to process
>
>
> You probably get the idea. Hope that is what you are looking for.
>
> Cheers,
> Ben
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 15:09:05 +0200
> From: Michael Schmid <
[hidden email]>
> Subject: Re: stack threshold
>
> Hi Cosmin,
>
> what about converting the threshold of the first slice into a
> selection
> run("Create Selection");
> and then either replacing these pixels (or the non-selected ones,
> using "Make Inverse", depending on your needs) by some value
> that does not interfere with the analysis?
> E.g. "Clear", "Fill", run("Min...", "value=255 stack"); etc.
>
> Even without modifying the image, the selection will restrict
> the area for future measurements of other slices, so just creating
> the selection might be enough (e.g. if you use the histogram or
> getStatistics for analysis of the stack slices).
>
> Michael
> ________________________________________________________________
>
> On 6 Jul 2007, at 21:55, Cosmin Mihai wrote:
>
>> Hi,
>>
>> I have a question regarding thresholding of ImageJ stacks.
>> When using the threshold comand on the first slice, the rest of the
>> stack
>> is thresholded in the same limits. I am studying bleaching
>> processes and I
>> am interested in eliminating from my analysis pixels above a certain
>> value. The problem in the standard threshold is that the pixels
>> eliminated
>> from the first slice might be reintroduced in the later slices when
>> their
>> intensity falls in the threshold interval.
>> Is there any way to permanently eliminate those pixels from the whole
>> stack ?
>>
>> Thank you,
>> Cosmin
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 16:19:32 +0200
> From: Michael Schmid <
[hidden email]>
> Subject: Re: ImageJ interaction: ROI Manager etc.
>
> On 5 Jul 2007, at 09:41, Karsten Rodenacker wrote:
>
>> Using the ROI Manger with display, the numbers in the display
>> usually don't correspond with the numbers of the ROI's in the list,
>> at least after having deleted any object from the list. Is that
>> intended?
> Hmm, the rois are not numbered in the roi manager, but have names
> that relate to their y and x coordinates. The labels are the position
> in the list of rois and updated correctly, as far as I see (ImageJ
> 1.38v; maybe you have an earlier version?)
>
>> Using the Wand on a mask image clicking into the background will
>> select the next most connected object on the right. Is that intended?
> It has been like this since the early days of ImageJ and I think
> everyone is used to it by now, even though it is different from the
> Wand of other programs.
>
>> Having a list of objects in the ROI manager, I would like to
>> correct one selected, either cut it into two or change it and than
>> update it in the ROI manager. My quite complicated way was:
>> 1. Select the object
>> 2. Change the mask image by drawing, deleting, etc.
>> 3. Remove the selection
>> 4. Multiple object select by doWand with shift if there are more
>> than one object after correction
>> 5. Add the object(s) to ROI Manager
>> 6. Find the formerly selected object and delete it in the ROI list
>> Another again complicated method is:
>> 1. correct the mask image
>> 2. (re)run analyze particles...
>> 3. control the objects
>> 4. if necessary go to 1.
>> Is there any idea to improve this proceeding?
> What about this:
> 1. select all items in ROI manager
> 2. ROI Manager More>>Combine (may be slow with many particles)
> 3. Create Mask
> 4. correct whatever you like (draw, delete, fill)
> 5. run "Analyze Particles" on the mask
> 6. delete everything in the ROI Manager
> 7. ROI Manager More>>Add Particles
>
> 1.-3. is not needed in case you have the mask of all objects already.
> ---
> Michael
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 17:52:58 +0200
> From: Karsten Rodenacker <
[hidden email]>
> Subject: Re: ImageJ interaction: ROI Manager etc.
>
> Thank you Michael for explanations. Consider my questions as from a
> newbie.
>
> Am 09.07.2007 um 16:19 schrieb Michael Schmid:
>
>> On 5 Jul 2007, at 09:41, Karsten Rodenacker wrote:
>>
>>> Using the ROI Manger with display, the numbers in the display
>>> usually don't correspond with the numbers of the ROI's in the
>>> list, at least after having deleted any object from the list. Is
>>> that intended?
>> Hmm, the rois are not numbered in the roi manager, but have names
>> that relate to their y and x coordinates. The labels are the
>> position in the list of rois and updated correctly, as far as I see
>> (ImageJ 1.38v; maybe you have an earlier version?)
>>
> I mistook the first four character in the ROI list as number. I have
> the current ImageJ version, that live updater is very helpful.
> However, dealing with several hundred particles, it is cumbersome to
> relate the displayed number with the respective ROI.
>
>>> Using the Wand on a mask image clicking into the background will
>>> select the next most connected object on the right. Is that intended?
>> It has been like this since the early days of ImageJ and I think
>> everyone is used to it by now, even though it is different from the
>> Wand of other programs.
>>
> Ok, I did not trust my machine!
>
>>> Having a list of objects in the ROI manager, I would like to
>>> correct one selected, either cut it into two or change it and than
>>> update it in the ROI manager. My quite complicated way was:
>>> 1. Select the object
>>> 2. Change the mask image by drawing, deleting, etc.
>>> 3. Remove the selection
>>> 4. Multiple object select by doWand with shift if there are more
>>> than one object after correction
>>> 5. Add the object(s) to ROI Manager
>>> 6. Find the formerly selected object and delete it in the ROI list
>>> Another again complicated method is:
>>> 1. correct the mask image
>>> 2. (re)run analyze particles...
>>> 3. control the objects
>>> 4. if necessary go to 1.
>>> Is there any idea to improve this proceeding?
>> What about this:
>> 1. select all items in ROI manager
>> 2. ROI Manager More>>Combine (may be slow with many particles)
>> 3. Create Mask
>> 4. correct whatever you like (draw, delete, fill)
>> 5. run "Analyze Particles" on the mask
>> 6. delete everything in the ROI Manager
>> 7. ROI Manager More>>Add Particles
>>
>> 1.-3. is not needed in case you have the mask of all objects already.
> Thank you, I tried that. This way is similar to applying analyze
> particle... with appropriate options after mask correction.
>
> Regards
> Karsten
>
> ------------------------------
>
> Date: Mon, 9 Jul 2007 19:07:22 -0700
> From: Jon Harman <
[hidden email]>
> Subject: ImageJ undo notification
>
> Hi,
>
> Just wondering if there is any way my plugin can find out if undo has
> been done on an image. I have set up my plugin to implement ImageJ's
> undo command and undo works within my plugin. My plugin can do many
> different things to an image. For the output result I create a name
> that reflects what has been done to the image. So I would like to know
> if the user has undone a step.
>
> More generally I'd like to know the sequence of ImageJ commands that
> have been performed on an image. Does ImageJ keep a log of this
> somewhere? It must have some capability to do this in the macro
> recorder. My goal will be to document exactly what has been done to an
> input image to get the output image. I can keep track of this for my
> own plugin commands, but would like to also keep track of any ImageJ
> commands (smoothing, sharpen, etc) that have been done to the image.
>
> Thanks,
> Jon
>
> ------------------------------
>
> End of IMAGEJ Digest - 8 Jul 2007 to 9 Jul 2007 (#2007-178)
> ***********************************************************
>