User Tools

Site Tools


blogtng:2010-06-17:imaris_-_java

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
blogtng:2010-06-17:imaris_-_java [2010/06/17 15:43] – created kotablogtng:2010-06-17:imaris_-_java [2020/11/26 09:11] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +~~NOTOC~~
 ===== Imaris - Java ===== ===== Imaris - Java =====
 +
 +Here is some notes on accessing Imaris contents from Java. Since this example uses COM interface via jacob.dll, platform is limited to windows. 
  
 ==== Setup ==== ==== Setup ====
Line 5: Line 8:
 There is a breif description in  There is a breif description in 
 http://www.bitplane.com/go/products/imarisxt http://www.bitplane.com/go/products/imarisxt
-<quote>+<blockquote>
 In order to run the JACOB demo, the Java COM Bridge needs to be installed (put the jacob.dll into /bin and the jacob.jar into /lib/ext). The demo does similar things like the demos above: Start Imaris, load a Dataset, perform some action with the image, and terminate Imaris. Many thanks for providing the source code to Volker Bäcker, Monpellier RIO Imaging. In order to run the JACOB demo, the Java COM Bridge needs to be installed (put the jacob.dll into /bin and the jacob.jar into /lib/ext). The demo does similar things like the demos above: Start Imaris, load a Dataset, perform some action with the image, and terminate Imaris. Many thanks for providing the source code to Volker Bäcker, Monpellier RIO Imaging.
-</quote>+</blockquote>
  
 So accessing Imaris from Java requires Jacob pakage (Java - COM Bridge, http://sourceforge.net/projects/jacob-project/). When I downloaded the latest version, two .dll files were included in the package and no jacob.dll.  So accessing Imaris from Java requires Jacob pakage (Java - COM Bridge, http://sourceforge.net/projects/jacob-project/). When I downloaded the latest version, two .dll files were included in the package and no jacob.dll. 
-<quote>+<blockquote>
 Jacob.jar relies on a DLL file that it loads off of the library path or classpath. This means that you must either copy the appropriate jacob ddll into your path or use VM options to add directory holding jacob dll to the path. Prior to 1.14M6, the jacob DLL name was alwasy "jacob.dll". This made it hard to verify jacob was loading the correct dll when multiple copies of jacob were installed on a single system. It also was confusing on 64 bit systems where the 32 bit and 64 bit dlls have the same tames. Starting in 1.14M6, Jacob's library loader selects a dll with the appropriate name based on the jacob release and platform. The dll naming convention is:  Jacob.jar relies on a DLL file that it loads off of the library path or classpath. This means that you must either copy the appropriate jacob ddll into your path or use VM options to add directory holding jacob dll to the path. Prior to 1.14M6, the jacob DLL name was alwasy "jacob.dll". This made it hard to verify jacob was loading the correct dll when multiple copies of jacob were installed on a single system. It also was confusing on 64 bit systems where the 32 bit and 64 bit dlls have the same tames. Starting in 1.14M6, Jacob's library loader selects a dll with the appropriate name based on the jacob release and platform. The dll naming convention is: 
 jacob<platform>.<version.>.dll jacob<platform>.<version.>.dll
-</quote>+</blockquote>
  
 There actually are following two .dll files in the package. There actually are following two .dll files in the package.
Line 27: Line 30:
  
  
-Example java code by Volker Bäcker is available in the Bitplane linked above. I downloaded the java file made it testable in Eclipse (simply add jacob.jar file in the build path). +Example java code by Volker Bäcker is available in the Bitplane site linked above. I downloaded the java file and then made it testable in Eclipse (simply add jacob.jar file in the project build path). 
  
 === Start button: starts up Imaris === === Start button: starts up Imaris ===
Line 48: Line 51:
 "mVisible" is a property of IApplication Interface and details are in: "mVisible" is a property of IApplication Interface and details are in:
 http://www.bitplane.com/products/imarisxt/doc/interfaceIApplication.html#6dd1946c64e40cac3f7ca33fc85e520c http://www.bitplane.com/products/imarisxt/doc/interfaceIApplication.html#6dd1946c64e40cac3f7ca33fc85e520c
 +
 +ActiveXComponent is a class provided in Jacob package, and accessing Imaris functions are mostly done through the method of this class. Java doc is at:
 +http://www.jarvana.com/jarvana/view/net/sf/jacob-project/jacob/1.14.3/jacob-1.14.3-javadoc.jar!/api/com/jacob/activeX/ActiveXComponent.html
  
 === text field & "Load" button (first and second line) === === text field & "Load" button (first and second line) ===
Line 59: Line 65:
 </code> </code>
  
-imarisapplication is an instance of ActiveXComponent constructed above. "FileOpen" is a member funciton of IApplication Interface and details are in:+imarisapplication is an instance of ActiveXComponent constructed above. Class Variant is described in the Jacob Java doc: 
 + 
 +http://www.jarvana.com/jarvana/view/net/sf/jacob-project/jacob/1.14.3/jacob-1.14.3-javadoc.jar!/api/com/jacob/com/Variant.html 
 + 
 +"FileOpen" is a member funciton of IApplication Interface and details are in:
 http://www.bitplane.com/products/imarisxt/doc/interfaceIApplication.html#eef133819f46ccfb4af8a4483990436f http://www.bitplane.com/products/imarisxt/doc/interfaceIApplication.html#eef133819f46ccfb4af8a4483990436f
  
blogtng/2010-06-17/imaris_-_java.1276789394.txt.gz · Last modified: 2016/05/24 12:46 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki