Re: IMAGEJ Digest - 17 Dec 2014 to 18 Dec 2014 (#2014-367)

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

Re: IMAGEJ Digest - 17 Dec 2014 to 18 Dec 2014 (#2014-367)

Uknalis, Joseph
OK.

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of IMAGEJ automatic digest system
Sent: Friday, December 19, 2014 00:01
To: [hidden email]
Subject: IMAGEJ Digest - 17 Dec 2014 to 18 Dec 2014 (#2014-367)

There are 6 messages totaling 663 lines in this issue.

Topics of the day:

  1. Wait for MacroRunner
  2. New Macro by James Eklund and Matthew Ott
  3. measuring muscle mass on abdominal CT scan
  4. Stitching 1.1 Release (2)
  5. ImageJ java.lang.IllegalArgumentException: Negative position error

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

----------------------------------------------------------------------

Date:    Thu, 18 Dec 2014 10:58:54 +0100
From:    Peter Haub <[hidden email]>
Subject: Re: Wait for MacroRunner

Hallo Jan,
Hallo Wayne,

Yes, this helps.
Back to IJ.run() I got rid of the all that MacroRunner, ThreadWatchers etc..

Incorrectly I wrote "Test_Plugin" instead of "Test Plugin" to call the plugin Test_Plugin.
My fault.  :-((

Thanks for your help.

Regards,
Peter


On 17.12.2014 14:41, Jan Eglinger wrote:

> Dear Peter,
>
> > This I have done by using a MacroRunner in MyPlugin, such as:
> >              ...
> >              String macroStr = "run(" + cmdStr + "," + argStr +");";
> >              macro = new MacroRunner(macroStr);
> >              ...
>
> To run a plugin from within another plugin, you can use
>
>     IJ.run(cmdStr, argStr);
>
> (see http://javadoc.imagej.net/ImageJ1/index.html?ij/IJ.html )
>
> You can record the necessary code for the plugin by running the Macro
> recorder (Plugins > Macros > Record...) in Java mode.
>
>
> Does that help?
>
> Cheers,
> Jan
>
>
>
> On 17.12.14 12:37, Peter Haub wrote:
>> Dear Wayne,
>>
>> I need to call a plugin via macro call to bypass the user dialogs of
>> the plugin.
>> This I have done by using a MacroRunner in MyPlugin, such as:
>>              ...
>>              String macroStr = "run(" + cmdStr + "," + argStr +");";
>>              macro = new MacroRunner(macroStr);
>>              ...
>>
>> The problem is that MyPlugin has to wait until the macro thread has
>> been finished. I managed this by adding a getThread() function into
>> the MacroRunner.java. In MyPlugin I can wait for the macro thread e.g. by:
>>              ...
>>              t = macro.getThread();
>>              while (!t.isInterrupted() && t.isAlive()){
>>                  IJ.wait(200);
>>              }
>>              ...
>>
>> My questions are:
>> Is there a more simple way to achieve my task (calling a plugin from
>> a plugin with an argument string and bypassing user dialogs)?
>> If my MacroRunner suggestion is a working option, would it be
>> possible to add a getThread() function into the MacroRunner code of a
>> next version of ImageJ? (We would like to stay on the official ImageJ
>> code.)
>>
>> Thanks
>> and regards,
>>
>> Peter
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

------------------------------

Date:    Thu, 18 Dec 2014 08:22:56 -0600
From:    Matthew Ott <[hidden email]>
Subject: New Macro by James Eklund and Matthew Ott

Greetings ImageJ community,

We wanted to share a new macro that will be useful for anyone doing
agricultural research. See below...

Best,

Matthew Ott

// This macro calculates the percent green of an image
// with the Hue set to 44 and 122, which includes
// all the green hues of plant tissue. It identifies
// any green in the image and turns it to black and
// everything else becomes white. From this ImageJ
// calculates the percent of the pixels that were green,
// but then changed to black.Weeds must be brushed
// or "spray painted" white to exclude them.
// **Important note - the scale of this macro is set
// to an average of the pictures we at the USDA-ARS
// and University of MN were processing. We scale the
// image using a meter stick in the photo taken at a
// height of about 1.5 meters. The protocol (hue
// settings etc.) was developed by James Eklund
// of the USDA-Agricultural Research Service and
// the macro for the protocol was developed by
// Matthew Ott of the University of Minnesota with
// the aid of Arjun Mehta's online guide for creating
// macros:
// http://www.scribd.com/doc/95224926/How-to-Automate-
// ImageJ-Analysis-With-Macros-and-Batch-Processing

run("Set Scale...", "distance=3494.5 known=100 unit=cm");
run("Color Threshold...");
// Color Thresholder 1.49m
// Autogenerated macro, single images only!
min=newArray(3);
max=newArray(3);
filter=newArray(3);
a=getTitle();
run("HSB Stack");
run("Convert Stack to Images");
selectWindow("Hue");
rename("0");
selectWindow("Saturation");
rename("1");
selectWindow("Brightness");
rename("2");
min[0]=44;
max[0]=122;
filter[0]="pass";
min[1]=0;
max[1]=255;
filter[1]="pass";
min[2]=0;
max[2]=255;
filter[2]="pass";
for (i=0;i<3;i++){
  selectWindow(""+i);
  setThreshold(min[i], max[i]);
  run("Convert to Mask");
  if (filter[i]=="stop")  run("Invert");
}
imageCalculator("AND create", "0","1");
imageCalculator("AND create", "Result of 0","2");
for (i=0;i<3;i++){
  selectWindow(""+i);
  close();
}
selectWindow("Result of 0");
close();
selectWindow("Result of Result of 0");
rename(a);
// Colour Thresholding-------------
run("8-bit");
setAutoThreshold("Default");
//run("Threshold...");
setOption("BlackBackground", false);
run("Convert to Mask");
run("Analyze Particles...", "  show=Masks display summarize");

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

------------------------------

Date:    Thu, 18 Dec 2014 15:35:32 +0000
From:    "J.L.A. van Vugt" <[hidden email]>
Subject: measuring muscle mass on abdominal CT scan

Tow whom it may concern,



Is there any tutorial explaining how to measure the cross sectional muscle area (cm2) on abdominal CT scans or could someone explain me how to perform these measurements?

With kind regards,

Jeroen van Vugt
PhD student Department of Surgery

[Erasmus MC]



Postbus 2040, 3000 CA Rotterdam

Bezoekadres: Wytemaweg 80, 3015 CN Rotterdam, kamer Ee-173

E  [hidden email]<mailto:[hidden email]> |
T  010 704 36 83

www.erasmusmc.nl<http://www.erasmusmc.nl/>





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

------------------------------

Date:    Thu, 18 Dec 2014 18:25:10 +0100
From:    Peter Haub <[hidden email]>
Subject: Re: Stitching 1.1 Release

Hi Mark,
Dear list,

version 1.1 of the Stitching plugin is currently included in FIJI.
The source code on github is version 1.11.

Is there a development schedule for this plugin?
Is there a plan to release version 1.11?
Where can the source code of 1.1 be found?

Thanks for any answer.
Regards,
Peter

On 09.05.2014 18:40, Mark Hiner wrote:

> Dear Stitching users,
>
>   You may have noticed that the Stitching plugins (Plugins > Stitching >
> Pairwise stitching, and Plugins > Stitching > Grid/Collection stitching)
> take a fairly significant amount of time to get through the fusion process.
> Today, I am pleased to announce Stitching version 1.1 which features
> greatly reduced fusion times, available now in Fiji (just run Help > Update
> Fiji).
>
>   Briefly, the old fusion paradigm was to iterate through output image's
> pixels and, at each position, check every input image to see if they
> overlapped at that position. By pre-computing these contribution ranges at
> the start of fusion, we can see significant performance improvements.
>
>   The actual speedup will depend on the number of images being stitched and
> how much they overlap, but on a test dataset with ~150 images and 10%
> overlap, the new fusion method was over an order of magnitude faster (80
> seconds + ~10 seconds of pre-computation, down from 20 minutes with the
> previous Stitching version).
>
>   We have done a number of tests comparing the output of the new plugin with
> the previous Stitching version, and as far as we can tell the new results
> are pixel-perfect matches with the old, so the quality of your data should
> not be affected.
>
>    If you do run into any problems, errors, mis-stitches, etc... or have any
> questions/comments about the Stitching plugin and its uses, please let us
> know!
>
> Happy stitching!
> - Mark
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

------------------------------

Date:    Thu, 18 Dec 2014 11:52:50 -0600
From:    Curtis Rueden <[hidden email]>
Subject: Re: Stitching 1.1 Release

Hi Peter,

> Is there a plan to release version 1.11?

A new version of the Stitching plugin will be uploaded tomorrow as part of
the "Big Upload"; see:

https://list.nih.gov/cgi-bin/wa.exe?A2=IMAGEJ;a9147af3.1412

> Is there a development schedule for this plugin?

There is no formal roadmap, though there is typically a rapid turnaround on
releases after bugs are fixed.

> Where can the source code of 1.1 be found?

It is in the Git history, of course. Unfortunately, the version embedded in
the source code has diverged from the version embedded in the Maven POM. We
will need to reconcile this.

For now, the way to find the right source is:
- Unpack the JAR file in question.
- Look at the Implementation-Build entry in META-INF/MANIFEST.MF.

In the case of the Stitching plugin currently shipped with Fiji, the
revision is:
e6f18ad79afdd542db8030291a1dfc73e6ba130e

So the source is at:
https://github.com/fiji/Stitching/commit/e6f18ad79afdd542db8030291a1dfc73e6ba130e

Regards,
Curtis

On Thu, Dec 18, 2014 at 11:25 AM, Peter Haub <[hidden email]> wrote:

>
> Hi Mark,
> Dear list,
>
> version 1.1 of the Stitching plugin is currently included in FIJI.
> The source code on github is version 1.11.
>
> Is there a development schedule for this plugin?
> Is there a plan to release version 1.11?
> Where can the source code of 1.1 be found?
>
> Thanks for any answer.
> Regards,
> Peter
>
>
> On 09.05.2014 18:40, Mark Hiner wrote:
>
>> Dear Stitching users,
>>
>>   You may have noticed that the Stitching plugins (Plugins > Stitching >
>> Pairwise stitching, and Plugins > Stitching > Grid/Collection stitching)
>> take a fairly significant amount of time to get through the fusion
>> process.
>> Today, I am pleased to announce Stitching version 1.1 which features
>> greatly reduced fusion times, available now in Fiji (just run Help >
>> Update
>> Fiji).
>>
>>   Briefly, the old fusion paradigm was to iterate through output image's
>> pixels and, at each position, check every input image to see if they
>> overlapped at that position. By pre-computing these contribution ranges at
>> the start of fusion, we can see significant performance improvements.
>>
>>   The actual speedup will depend on the number of images being stitched
>> and
>> how much they overlap, but on a test dataset with ~150 images and 10%
>> overlap, the new fusion method was over an order of magnitude faster (80
>> seconds + ~10 seconds of pre-computation, down from 20 minutes with the
>> previous Stitching version).
>>
>>   We have done a number of tests comparing the output of the new plugin
>> with
>> the previous Stitching version, and as far as we can tell the new results
>> are pixel-perfect matches with the old, so the quality of your data should
>> not be affected.
>>
>>    If you do run into any problems, errors, mis-stitches, etc... or have
>> any
>> questions/comments about the Stitching plugin and its uses, please let us
>> know!
>>
>> Happy stitching!
>> - Mark
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

------------------------------

Date:    Thu, 18 Dec 2014 13:09:23 -0600
From:    Curtis Rueden <[hidden email]>
Subject: Re: ImageJ java.lang.IllegalArgumentException: Negative position error

Hi Youngjae,

>  java.lang.IllegalArgumentException: Negative position
>   at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:600)
>   at loci.common.NIOByteBufferProvider.allocateDirect(
NIOByteBufferProvider.java:131)

Looks like a bug in the Bio-Formats library.

Please report this bug to the Bio-Formats team:
http://openmicroscopy.org/info/bio-formats/about/bug-reporting.html

Regards,
Curtis

On Wed, Dec 17, 2014 at 4:05 PM, Youngjae Jeong <[hidden email]>
wrote:

>
> ​Hello all,
>
> I recently have started to figure out how to use imageJ to analyze the uCT
> scans of bone geometry. The size of raw file is quite large, which is about
> 16GB. Because of lare size of the file, it gives me an error with memory
> issue. So what I have tried next is to open up file by specifying the range
> of images. The size of file is 2048x2048; 2016 planes. It shows me an image
> when I have selected 1(Z begin)-250(Z End) with 1 for Z step. The problem
> arise when I have tried to select beyond 250 and it gives me following
> messages.
>
> The file I am opening is ct.img.hdr file and this scan was done by inveon
> uCT scan. The disc image file (.ct) is ~16GB
>
>
> (Fiji Is Just) ImageJ 2.0.0-rc-15/1.49m; Java 1.6.0_24 [64-bit]; Windows
> NT (unknown) 6.2; 527MB of 2977MB (17%)
>
>  java.lang.IllegalArgumentException: Negative position
>   at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:600)
>   at
> loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:131)
>   at
> loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:116)
>   at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:551)
>   at loci.common.NIOFileHandle.seek(NIOFileHandle.java:273)
>   at
> loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:154)
>   at loci.formats.in.InveonReader.openBytes(InveonReader.java:118)
>   at loci.formats.ChannelFiller.openBytes(ChannelFiller.java:193)
>   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:222)
>   at loci.formats.ChannelSeparator.openBytes(ChannelSeparator.java:155)
>   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>   at loci.formats.DimensionSwapper.openBytes(DimensionSwapper.java:243)
>   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>   at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:313)
>   at
> loci.plugins.util.ImageProcessorReader.openProcessors(ImageProcessorReader.java:190)
>   at
> loci.plugins.in.ImagePlusReader.readProcessors(ImagePlusReader.java:416)
>   at loci.plugins.in.ImagePlusReader.readPlanes(ImagePlusReader.java:380)
>   at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:277)
>   at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:238)
>   at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:216)
>   at
> loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:114)
>   at loci.plugins.in.Importer.readPixels(Importer.java:150)
>   at loci.plugins.in.Importer.run(Importer.java:89)
>   at loci.plugins.LociImporter.run(LociImporter.java:81)
>   at ij.IJ.runUserPlugIn(IJ.java:202)
>   at ij.IJ.runPlugIn(IJ.java:166)
>   at ij.IJ.runPlugIn(IJ.java:155)
>   at HandleExtraFileTypes.openImage(HandleExtraFileTypes.java:421)
>   at HandleExtraFileTypes.run(HandleExtraFileTypes.java:57)
>   at ij.IJ.runUserPlugIn(IJ.java:202)
>   at ij.IJ.runPlugIn(IJ.java:166)
>   at ij.IJ.runPlugIn(IJ.java:155)
>   at ij.io.Opener.openWithHandleExtraFileTypes(Opener.java:483)
>   at ij.io.Opener.openImage(Opener.java:361)
>   at ij.plugin.FolderOpener.run(FolderOpener.java:114)
>   at ij.IJ.runPlugIn(IJ.java:172)
>   at ij.Executer.runCommand(Executer.java:131)
>   at ij.Executer.run(Executer.java:64)
>   at java.lang.Thread.run(Thread.java:662)
>
>
> I am kinda naive on java.script and imageJ as well. Can anyone tell me
> what I am doing wrong?? or any reason of this error?
>
>
> Thank you,
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

------------------------------

End of IMAGEJ Digest - 17 Dec 2014 to 18 Dec 2014 (#2014-367)
*************************************************************




This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.

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