Login  Register

Re: Cannot use TurboReg plugin by using matlab

Posted by Yuekan Jiao-2 on Dec 10, 2016; 6:03am
URL: http://imagej.273.s1.nabble.com/Cannot-use-TurboReg-plugin-by-using-matlab-tp5017668p5017746.html

Hi Chunyue,

In the command of your step 7, replace ' -file ' with ' -window ', as you
have two windows "stack1.tif" and "AVG_stack1.tif". See TurboReg
instruction at
http://bigwww.epfl.ch/thevenaz/turboreg/

Good luck.

Yuekan


On Fri, Dec 9, 2016 at 8:46 PM, LCY <[hidden email]> wrote:

> Hi Yuekan,
>
> Thank you very much for your help. Maybe you are right. However, I don't
> know how to specify the source and target from ' -file '  to ' -window '.
> Could you please show me an example?
>
> All the best,
>
> Chunyue
>
> 2016-12-06 0:40 GMT+08:00 Yuekan Jiao-2 [via ImageJ] <
> [hidden email]>:
>
> > Hi Chunyue,
> >
> > If I understand, you have 2 opened windows "stack1.tif" and
> > "AVG_stack1.tif",  you need to specify the source and target from ' -file
> > '
> > to ' -window '. file paths do not matter.
> >
> > I am not sure that TurboReg can do alignment for a stack, but a single
> > slice should be fine.
> >
> > Yuekan
> >
> > On Fri, Dec 2, 2016 at 11:49 PM, LCY <[hidden email]
> > <http:///user/SendEmail.jtp?type=node&node=5017688&i=0>> wrote:
> >
> > > Hi Curtis,
> > >
> > > Thank you very much for your help!
> > >
> > > This is what I have: window 10 system, Matlab 2015b, Fiji(based on java
> > 6)
> > > which I store in "C:\Users\[my name]\Fiji.app".
> > >
> > > I want to do matching among many tiff stacks. Because my other codes
> are
> > > programmed by Matlab, I want to use TurboReg plugin from Matlab to
> > process
> > > these files automatically.
> > >
> > > *This is how I do that* :
> > >  step 1: update Fiji as you suggested;
> > >  step 2: add path in Matlab:"C:\Users\[my name]\Fiji.app\scripts"
> > >  step 3: start Fiji in my Matlab code by using the command "Miji;"
> > >  step 4: open one tiff stack file by using "MIJ.run('Open...',
> > > ['path=','F:\TwoPhotonfile\stack1.tif']);"
> > > step 5: normalize and average my tiff stack file by using
> > > MIJ.run('Open...',...) and  MIJ.run('Enhance Contrast...',..)
> > separately.
> > > step 6: now there are two opened windows, one is the normalized tiff
> > stack
> > > file, the other is the averaged image file (contains only one image)
> > > step 7: do matching by using
> > > " MIJ.run('TurboReg ', ['-align ', '-file ','stack1.tif',' ','0 0
> > > ',num2str(width),' ',num2str(height),' ',...
> > >     '-file ','AVG_stack1.tif',' ','0 0 ',num2str(width),'
> > > ',num2str(height),' ','-rigidBody ',num2str(width/2),...
> > >     ' ',num2str(height/2),' ',num2str(width/2),' ',num2str(height/2),'
> > ','0
> > > ',num2str(height/2),' ','0 ',...
> > >     num2str(height/2),' ',num2str(width-1),' ',num2str(height/2),'
> > > ',num2str(width-1),' ',num2str(height/2),' ','-showOutput']); "
> > >
> > > *The results showed in ImageJ Exception are as follow:*
> > > "ImageJ 1.50e; Java 1.7.0_60 [64-bit]; Windows 8 6.2; 178MB of 3725MB
> > (4%)
> > >
> > > java.lang.NullPointerException
> > >         at TurboReg_.alignImages(TurboReg_.java:893)
> > >         at TurboReg_.run(TurboReg_.java:636)
> > >         at ij.IJ.runUserPlugIn(IJ.java:212)
> > >         at ij.IJ.runPlugIn(IJ.java:176)
> > >         at ij.Executer.runCommand(Executer.java:136)
> > >         at ij.Executer.run(Executer.java:65)
> > >         at ij.IJ.run(IJ.java:292)
> > >         at MIJ.run(MIJ.java:1171)"
> > >
> > > *This is what I have done:*
> > >
> > > I try to change the source path to 'F:\TwoPhotonfile\stack1.tif', but
> > this
> > > doesn' t work;
> > > I double clicked the information in Exception window, it showed "file
> is
> > > not
> > > in a supported format, a reader plugin is not available, or it was not
> > > found". But, this plugin works when I use it manually.
> > >
> > > Thank you for your help, Curtis!
> > >
> > > All the best,
> > >
> > > Chunyue
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context: http://imagej.1557.x6.nabble.
> > > com/Cannot-use-TurboReg-plugin-by-using-matlab-tp5017668p5017679.html
> > > Sent from the ImageJ mailing list archive at Nabble.com.
> > >
> > > --
> > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> > >
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
> >
> > ------------------------------
> > If you reply to this email, your message will be added to the discussion
> > below:
> > http://imagej.1557.x6.nabble.com/Cannot-use-TurboReg-
> > plugin-by-using-matlab-tp5017668p5017688.html
> > To unsubscribe from Cannot use TurboReg plugin by using matlab, click
> here
> > <http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?
> macro=unsubscribe_by_code&node=5017668&code=Y2h1bnl1ZTA3MjBAZ21haWwuY29tfD
> UwMTc2Njh8MjA3MTgxODY1MQ==>
> > .
> > NAML
> > <http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?
> macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&
> base=nabble.naml.namespaces.BasicNamespace-nabble.view.
> web.template.NabbleNamespace-nabble.view.web.template.
> NodeNamespace&breadcrumbs=notify_subscribers%21nabble%
> 3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_
> instant_email%21nabble%3Aemail.naml>
> >
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Cannot-use-TurboReg-plugin-by-using-matlab-tp5017668p5017745.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html