Twain driver problem

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

Twain driver problem

jknowles
Hi

 

I am an absolute beginner with Imagej so please bear with me.

 

I have a camera that has TWAIN drivers. I have installed the plugin as per
the instructions at http://rsb.info.nih.gov/ij/plugins/twain.html

 

As per:

1.            Download Twain_6.class to the plugins folder.

2.            Download the Morena framework for Windows from
http://www.gnome.sk/ and extract the files to a temporary folder.

3.            Copy morena.jar, morena_windows.jar and morena_license.jar to
the ImageJ\jre\lib\ext folder.

4.            Restart ImageJ.

If I create a shortcut it starts fine and the TWAIN interface comes up.

 

What I would like to do is to do timelapse. I got some script:

 

dir=getDirectory("Images path");

Dialog.create("Timelapse");

Dialog.addNumber("Time beetween lapses", 1.0);

Dialog.addNumber("Number of lapses", 2);

Dialog.show();

delay=Dialog.getNumber();

nb=Dialog.getNumber();

i=1;

while(i<=nb){ tps1=getTime();

run("Twain 6", "default");

//run("Lena (47K)");

rename("image"+i);

name=getTitle();

run("Save", "save="+dir+name+".tif");

close(); tps2=getTime();

i++;

wait((1000*delay)-(tps2-tps1));

//write(""+(tps2-tps1));

}

 

When I run this, it starts fine, asks for a directory to put the images,
then opens a small window asking for the number of images and the time in
between on pressing OK it gets to the line run("Twain 6", "default"); "Twain
6 command unknown".

 

I have no idea why and any pointers would be massively appreciated.

 

Jonathan

University College London
Reply | Threaded
Open this post in threaded view
|

Re: Twain driver problem

Gabriel Landini
On Thursday 28 Apr 2011, Prof Jonathan Knowles wrote:
> When I run this, it starts fine, asks for a directory to put the images,
> then opens a small window asking for the number of images and the time in
> between on pressing OK it gets to the line run("Twain 6", "default");
> "Twain 6 command unknown".

Hi Jonathan,
I have no way of testing this because in linux, there is no twain driver, but
I wonder if the plugin file is where it should be (the error seems to indicate
that IJ cannot find it).

Is it compiled? (ie do you see the Twain_6.class file (note the underscore) in
the ImageJ/plugins folder? There are 2 files to download from the IJ site the
java file and the class file. You need the latter.

And if so, can you see "Twain 6" in the plugins menu? If not, then the plugin
is not loaded. It might be a corrupted file. I would try downloading it again.

I hope it helps.

Gabriel
Reply | Threaded
Open this post in threaded view
|

Re: Twain driver problem

Nilayjl
Hi Gabriel

Thanks for your reply. I am working together with Jonathan on the same time lapse problem. I tried re-downloading the Twain 6 plugin and running the script again. Like the last time it asks for the image path, number of lapses and time between lapses, but as soon as I enter these values, ImageJ shuts down and needs to be restarted. I checked the image path but no new file was created. The Twain_6 class file is present in the plugins folder and I can see "Twain 6" in the plugins menu. Are there any other issues you can think of that I need to look into?

Thanks

Nilay
Reply | Threaded
Open this post in threaded view
|

Re: Twain driver problem

Nilayjl
In reply to this post by Gabriel Landini
Hi Gabriel

Thanks for your reply. I am working together with Jonathan on the same time lapse problem. I tried re-downloading the Twain 6 plugin and running the script again. Like the last time it asks for the image path, number of lapses and time between lapses, but as soon as I enter these values, ImageJ shuts down and needs to be restarted. I checked the image path but no new file was created. The Twain_6 class file is present in the plugins folder and I can see "Twain 6" in the plugins menu. Are there any other issues you can think of that I need to look into?

Thanks

Nilay
Reply | Threaded
Open this post in threaded view
|

Re: Twain driver problem

Antoinette
This post has NOT been accepted by the mailing list yet.
TWAIN is an industrial standard that was defined by the TWAIN Working Group. It includes the specification, data source manager and sample code. TWAIN links applications and image acquisition devices (such as photo scanners and digital cameras). A mature TWAIN application will contain four classes: acquisition Object, device Object Class, deviceCollection and documentFeeder.