Compilation Error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation Error

Jprada
Hi, I am running Bio7 on a windows 7 machine with Java version 8 update 40. I cannot even run the starting example, I got the error posted on the image. I would much appreciate any help.
bye
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Error

Bio7
Dear Jprada,

thanks for the screenshot. I see that you mixing the old Bio7 examples with the new Bio7 2.0 examples.

The new Java examples are now regular JDT (Eclipse compiler) projects.

You only need the 'Bio7_Java_Examples' which a regular JDT projects (marked with a 'J' on the folder).

and the "Bio7_Script_Examples" which are not JDT projects because here you find the new script examples which of course don't have to be a JDT project.

Please delete the old examples to avoid the mixing.

Please consult this video which shows how to create a Java project and compile it with the dynamic compiler:

https://www.youtube.com/watch?v=2pGdEdhecvk

General overview (shows the Game of Life compilation):

https://youtu.be/pyYn690KaNE

The "Game of Life" example can be found as a Java package in the 'Bio7_Java_Examples' under the package "modelling".

I hope this info helps.

Reply | Threaded
Open this post in threaded view
|

Re: Compilation Error

Jprada
Hi, thanks a lot for your help. The examples now work well.

There is an example from 1.7 version that I would like to use but it seems to not be available in the 2.0 version examples, is the one to analyze a video linking Imagej and R. This is the tutorial that shows it.

http://www.uni-bielefeld.de/biologie/Oekosystembiologie/bio7app/flashtut/processavis.htm

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: Compilation Error

Bio7
You can find the example under Bio7_Java_Examples->src->r->ProcessAviStack.java


If you use a stack you can limit the run with something like this (using the setup method and action instead of the run method):

/****************************************************/
import com.eco.bio7.image.ImageMethods;
import com.eco.bio7.rbridge.RServe;

import ij.IJ;

/*
 This example demonstrates how to process image stacks or *.avi files
 with ImageJ and R. Please load a stack or *.avi file (which ImageJ can open!).
 After the compilation(Press the start button and adjust the speed)
 all frames of the stack are processed and analysed with R.
 */
public class ProcessAviStack extends com.eco.bio7.compile.Model {

        public void setup() {
                int slice = 1;
                double timeOut;
                long time;
                time = System.currentTimeMillis();
                /* Get the size of the stack! */
                int size = IJ.getImage().getImageStackSize();
                /* Loop over the stack! */
                while (slice <= size) {
                        IJ.run("Set Slice...", "slice=" + slice);
                        /* Transfer as integer! ->0=double, 1=integer, 2=byte, 3=RGB */
                        ImageMethods.imageToR("current", false, 1, null);
                        System.out.println("Mean: ");
                        RServe.print("mean(as.integer(current))");
                        // RServe.print("mean(fft(as.integer(current)))");
                        System.out.println();
                        timeOut = (double) (System.currentTimeMillis() - time) / 1000;
                        System.out.println("Time: (seconds) " + timeOut + " Fps: " + 1
                                        / timeOut);
                        System.out.println("Slice number: " + slice);
                        slice++;
                }
        }
}

/****************************************************/
(Note that you can simply copy and paste the code if you are working in the Java perspective!)

If you are interested in a pure stack image transfer you can also use the new stack transfer action in the ImageMethods dialog. Simply load a stack (or movie) and transfer it with a selected transfer method:

https://www.youtube.com/watch?v=Es-G4Ff--7Y 

(see 1:31)

I hope this info helps
Reply | Threaded
Open this post in threaded view
|

Re: Compilation Error

Jprada
Thanks is working just fine