Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interest point detection via beanshell broken #16

Closed
StephanJanosch opened this issue Mar 31, 2015 · 8 comments
Closed

interest point detection via beanshell broken #16

StephanJanosch opened this issue Mar 31, 2015 · 8 comments

Comments

@StephanJanosch
Copy link
Contributor

Okay, after updating Fiji yesterday the interest point detection does not work anymore on the cluster.

Check the 2nd last line in the Fiji output at the very bottom. It uses the default values for the DoG instead of the passed in values. Sigma and Threshold are ignored.

calling code

$fijiApp -Dxml=$xml -Dsigma=$sigma -Dthreshold=$threshold -Dchannels=$channels -Dlabel=$labels -DthreadCount=$threadCount -- --console $beanShellScript > $xmlDir/fiji_detect$jobName$labels$channels.txt

$beanShellScript

import ij.IJ;
import ij.Prefs;
import java.lang.Runtime;

runtime = Runtime.getRuntime();

//System.out.println("Interest Point Detection bsh - Stephan Janosch");

xmlFile=System.getProperty("xml");
sigma=System.getProperty("sigma");
threshold=System.getProperty("threshold");
channels=System.getProperty("channels");
label=System.getProperty("label");
threadCount=Integer.parseInt(System.getProperty("threadCount"));

Prefs.setThreads(threadCount);
//Prefs.savePreferences();

//IJ.run("Memory & Threads...", "parallel="+threadCount);


print(Prefs.getThreads());

channelsArray=channels.split(",");
channelsString="";

for (i=0;i<channelsArray.length;i++)
{
    channelsString = channelsString + "channel_" +channelsArray[i].toLowerCase()+" ";
}

print("Threshold: "+threshold);

//System.out.println(xmlFile);


IJ.run("Detect Interest Points for Registration", 
//"browse="+xmlFile+" "+
"select_xml="+xmlFile+" "+
"process_angle=[All angles] "+
"process_illumination=[All illuminations] "+
"process_timepoint=[All Timepoints] "+
"process_channel=[Multiple channels (Select from List)] "+ 
"type_of_interest_point_detection=Difference-of-Gaussian "+
"label_interest_points="+label+" "+
//"channel_dapi "+ 
//"channel_gfp "+ 
channelsString +
"subpixel_localization=[3-dimensional quadratic fit] "+
"interest_point_specification_(channel_dapi)=[Advanced ...] "+
"interest_point_specification_(channel_gfp)=[Advanced ...] "+
"sigma="+sigma+" "+
"threshold="+threshold+" "+
"find_maxima "+
"compute_on=[GPU approximate (Nvidia CUDA via JNA)] "+
"directory=/sw/users/janosch/lib "+
"select_native_library_for_cudaseparableconvolution=libSeparableConvolutionCUDALib.so"
);

runtime.exit(0);

what the closer got:

/sw/bin/xvfb-run -a /sw/users/janosch/Fiji2015.app/ImageJ-linux64 -Dxml=/projects/wormspim2/mvl_test/Worm4/OP43_Worm4_1.xml -Dsigma=2 -Dthreshold=0.003 -Dchannels=DAPI -Dlabel=beads -DthreadCount=7 -- --debug --console /home/janosch/beanshell/detectInterestPointsGPU.bsh > /projects/wormspim2/mvl_test/Worm4/fiji_detectOP43_Worm4_1beadsDAPI.txt

Output:

JRE not found in '/lustre/sw/users/janosch/Fiji2015.app/jre'
JAVA_HOME contains a JRE: '/lustre/sw/users/janosch/Fiji2015.app/java/linux-amd64/jdk1.6.0_24//jre'
Re-executing with correct library lookup path (/opt/lsf/7.0/linux2.6-glibc2.3-x86_64/lib:/lustre/sw/apps/cuda/6.5.14/lib64:/usr/share/pmc/perf/hpc/3.0/linux2.6-glibc2.3-x86_64/lib:/usr/share/pmc/perf/1.2/linux-x86_64/lib:/usr/share/pmc/perf/ego/1.2/linux-x86_64/lib:/usr/share/pmc/perf/lsf/7.0/linux-x86_64/lib:/usr/share/pmc/perf/hpc/3.0/linux-x86_64/lib:/1.2/linux2.6-glibc2.3-x86_64/lib:/lustre/sw/users/janosch/Fiji2015.app/lib/linux64:/lustre/sw/users/janosch/Fiji2015.app/mm/linux64)
JRE not found in '/lustre/sw/users/janosch/Fiji2015.app/jre'
JAVA_HOME contains a JRE: '/lustre/sw/users/janosch/Fiji2015.app/java/linux-amd64/jdk1.6.0_24//jre'
Using JAVA_HOME /lustre/sw/users/janosch/Fiji2015.app/java/linux-amd64/jdk1.6.0_24//jre
Opening Java library /lustre/sw/users/janosch/Fiji2015.app/java/linux-amd64/jdk1.6.0_24//jre/lib/amd64/server/libjvm.so
Adding option: -Djava.home=/lustre/sw/users/janosch/Fiji2015.app/java/linux-amd64/jdk1.6.0_24/
ij1.plugin.dirs: null
$HOME/.plugins: /home/janosch/.plugins does not exist
Launching main class bsh.Interpreter with parameters [/home/janosch/beanshell/detectInterestPointsGPU.bsh]
Class loader = sun.misc.Launcher$AppClassLoader@425224ee
7
Threshold: 0.003
Using spimdata version: 0.9-revision
Using spimreconstruction version: 2.1.2
Checking class loader: java.net.URLClassLoader@6548f8c8
Checking URL: file:/lustre/sw/users/janosch/Fiji2015.app/plugins/
Directory: /lustre/sw/users/janosch/Fiji2015.app/plugins
Checking class loader: sun.misc.Launcher$AppClassLoader@425224ee
Checking URL: file:/lustre/sw/users/janosch/Fiji2015.app/jars/imagej-launcher-3.1.6.jar
Not Eclipse because first entry is: file:/lustre/sw/users/janosch/Fiji2015.app/jars/imagej-launcher-3.1.6.jar
Checking class loader: java.net.URLClassLoader@6548f8c8
Checking URL: file:/lustre/sw/users/janosch/Fiji2015.app/plugins/
Checking class loader: sun.misc.Launcher$AppClassLoader@425224ee
Checking URL: file:/lustre/sw/users/janosch/Fiji2015.app/jars/imagej-launcher-3.1.6.jar
Not Eclipse because first entry is: file:/lustre/sw/users/janosch/Fiji2015.app/jars/imagej-launcher-3.1.6.jar
angles selected: 0, 1, 2, 3, 4
channels selected: DAPI
illuminations selected: 0
Timepoints selected: 0
Looking for native libraries ending with '.so', '.lib' in directory: '/sw/users/janosch/lib' ... 
Trying to load following library: /sw/users/janosch/lib/libSeparableConvolutionCUDALib.so
Using an outdated version of the CUDA libs, cannot query free memory. Assuming total memory.
Using device Tesla M2090 (id=0, mem=5375MB (5375MB free), CUDA capability 2.0)
(Tue Mar 31 14:40:38 CEST 2015): Requesting Img from ImgLoader (tp=0, setup=0)
Tue Mar 31 14:41:35 CEST 2015: Opening '/projects/wormspim2/mvl_test/Worm4/././OP43_Worm4_1_DAPI(0).czi.zip' [1920x1920x324 image=ArrayImg<FloatType>]
(Tue Mar 31 14:41:37 CEST 2015): min intensity = 80.0, max intensity = 8726.0
(Tue Mar 31 14:41:38 CEST 2015): computing difference-of-gausian (sigma=1.8, threshold=0.0080, sigma1=(1.7291616201400757, 1.7291616201400757, 1.7291616201400757), sigma2=(2.0813581943511963, 2.0813581943511963, 2.0813581943511963))
Tue Mar 31 14:41:38 CEST 2015: Computing DoG image (GPU).
@StephanPreibisch
Copy link
Member

I fixed a similar bug before changing the interface slightly ... can you check that your macro command is still up-to-date?

@StephanPreibisch
Copy link
Member

The details of the changes are explained in the release version announcement: https://github.com/bigdataviewer/SPIM_Registration/releases/tag/SPIM_Registration-2.1.2

@StephanJanosch
Copy link
Contributor Author

IJ.run("Detect Interest Points for Registration", "select_xml=/Volumes/wormspim2-1/mvl_test/Worm4//OP43_Worm4_1.xml "+
"process_angle=[Multiple angles (Select from List)] "+
"process_channel=[Multiple channels (Select from List)] "+
"process_illumination=[All illuminations] "+
"process_timepoint=[All Timepoints] "+
"angle_0 "+
"angle_1 "+
"channel_dapi "+
"channel_gfp "+
"type_of_interest_point_detection=Difference-of-Gaussian "+
"label_interest_points=beads_test "+
"downsample_images "+
"subpixel_localization=[3-dimensional quadratic fit] "+
"interest_point_specification_(channel_dapi)=[Advanced ...] "+
"interest_point_specification_(channel_gfp)=[Advanced ...] "+
"downsample_xy=4x "+
"downsample_z=1x "+
"sigma=.7 "+
"threshold=0.0030 "+
"find_maxima "+
"sigma=.7 "+
"threshold=0.0020 "+
"find_maxima "+
"compute_on=[CPU (Java)]");

screen shot 2015-04-01 at 12 46 34

screen shot 2015-04-01 at 12 46 45

@StephanJanosch
Copy link
Contributor Author

issue solved for me

@StephanPreibisch
Copy link
Member

I get the problem...it can be solved by running it for each channel individually, but I will fix it. We need a better macro language, this is just horrible!!

StephanPreibisch added a commit that referenced this issue Apr 1, 2015
@StephanPreibisch
Copy link
Member

Fixed with commit e0fe09b

@ctrueden
Copy link
Member

ctrueden commented Apr 6, 2015

@StephanPreibisch wrote:

We need a better macro language, this is just horrible!!

Well, the ImageJ2 parameterized scripting is supposed to help a lot with that. It is usable now, so people can migrate uses of GenericDialog over to the new parameter model. The only problem is: the script recorder feature is not finished (imagej/imagej-ui-swing#1), and unfortunately I will not have time to finish it in the next few months. But it would be my pleasure to pair program with a motivated person who wants to try their hand at it in the meantime.

@StephanPreibisch
Copy link
Member

I am also very busy right now, but moving forward would be great. I hope that from September on I will have more resources ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants