Ignore:
Timestamp:
04/07/11 20:42:59 (9 years ago)
Author:
aivar
Message:

Display critical messages with IJ.log. New style of using NativeLibraryUtility. New assembly-descriptor to produce jar with shared libraries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/curve-fitter/src/main/java/loci/curvefitter/SLIMCurveFitter.java

    r7673 r7683  
    3838import com.sun.jna.Native; 
    3939import com.sun.jna.ptr.DoubleByReference; 
     40 
     41import ij.IJ; 
    4042 
    4143import imagej.nativelibrary.NativeLibraryUtil; 
     
    139141                // extract to library path 
    140142                //TODO sort out the nameSystem.out.println("extract native library returns " + NativeLibraryUtil.extractNativeLibraryToPath(this.getClass(), "SLIMCurve-2.0-SNAPSHOT")); 
    141                 System.out.println("extract native library returns " + NativeLibraryUtil.extractNativeLibraryToPath(this.getClass(), "slim-curve-1.0-SNAPSHOT")); 
     143                //System.out.println("extract native library returns " + NativeLibraryUtil.extractNativeLibraryToPath(this.getClass(), "slim-curve-1.0-SNAPSHOT")); 
     144                System.out.println("loadNativeLibrary returns " + NativeLibraryUtil.loadNativeLibrary(this.getClass(), "slim-curve")); 
     145 
     146                IJ.log("before System load library"); 
     147                System.loadLibrary("slim-curve-1.0-SNAPSHOT"); 
     148                IJ.log("after System load library"); 
    142149 
    143150                // load once, on-demand 
     
    150157            } 
    151158            catch (UnsatisfiedLinkError e) { 
     159                IJ.log("unable to load dynamic library " + e.getMessage()); 
    152160                System.out.println("unable to load dynamic library " + e.getMessage()); 
    153161                return 0; 
     
    229237                    nInstrumentResponse = m_instrumentResponse.length; 
    230238                } 
    231                 for (int i = 0; i < m_free.length; ++i) { 
    232                     if (!m_free[i]) { 
    233                         System.out.println("fix " + i + " at " + data.getParams()[i]); 
    234                     } 
    235                 } 
    236239                returnValue = s_library.LMA_fit( 
    237240                        m_xInc, 
     
    249252                        chiSquareTarget 
    250253                        ); 
    251                 for (int i = 0; i < m_free.length; ++i) { 
    252                     if (!m_free[i]) { 
    253                         System.out.println("fixed " + i + " result " + data.getParams()[i]); 
    254                     } 
    255                 } 
    256254            } 
    257255        } 
Note: See TracChangeset for help on using the changeset viewer.