fiji / SPIM_Registration

Deprecated, instead check out: https://github.com/preibischLab/multiview-reconstruction & https://github.com/PreibischLab/BigStitcher
GNU General Public License v2.0
23 stars 22 forks source link

Question: Intensity based registration #104

Open tischi opened 8 years ago

tischi commented 8 years ago

Hi Stephan,

I was just wondering what your experience with intensity-based registration methods is, e.g. http://bigwww.epfl.ch/thevenaz/stackreg/? Do you feel there is any chance that this would work on 3-D data or is it just too much computation?

Best, Christian

axtimwalde commented 8 years ago

They are fine and there are good packages that implement them. Check elastix and ANTs toolbox.

Tobias implemented the basic Thenevaz approach for full affines some years ago for ImgLib2. It's in one of the advanced tutorials and works in an arbitrary number of dimensions. Images need to be approximately registered.

Best, Stephan

On Thu, 2016-06-30 at 07:53 -0700, tischi wrote:

Hi Stephan, I was just wondering what your experience with intensity-based registration methods is, e.g. http://bigwww.epfl.ch/thevenaz/stackreg/? Do you feel there is any chance that this would work on 3-D data or is it just too much computation? Best, Christian — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

StephanPreibisch commented 8 years ago

I think it would be a very useful addition to the multiview reconstruction. I am actually looking into adding Tobias's code. Once I have the basic framework in place to support it (views need to be transformed and extended with an outofbounds prior to running the intensity-based method) we can easily add more intensity-based methods.

tischi commented 8 years ago

Hi Stephan, Thanks for suggesting elastix. I tried it and it works for my data! Of course, it would be great to also have something inside ImageJ, as it would be much easier to script a full workflow.

tischi commented 8 years ago

...for now I decided to simply write a jython script in Fiji that uses the elastix binary with system calls.

StephanPreibisch commented 8 years ago

How many parameters are there, how hard is it to call? I would like to try to wrap it as well into the Multiview reconstruction ...

tischi commented 8 years ago

I just started writing some code 2h ago :-) Here is the current version: https://github.com/tischi/fiji-registration/blob/master/fiji--elastix.py Annoying is that you have to convert the files to something that ITK can read (i.e. .mhd).

You have to specify the parameters via text files. I also put the different elastix parameter files here: https://github.com/tischi/fiji-registration I read the elastic manual and I feel that for most problems the example parameter files will just work as is, i.e. without changing anything.

tischi commented 8 years ago

...I think it works for 3-D data with the exact same code.

axtimwalde commented 8 years ago

Cool. May be you guys find a way to JNI call, or to dig slightly deeper into the guts of elastix and use ITK directly (elastix is a wrapper to ITK), preferably through Matt McCormick's (@thewtex) SimpleITK bindings

http://imagej.net/ITK

tischi commented 8 years ago

For me, this is too far outside my comfort-zone, but probably Stephan is more able!

In general, from reading the manual, I feel that the elastix guys really know what they are doing and already implemented everything that is reasonable in the domain of intensity-based-registration. So re-using their code, in whatever way, seems like a very good idea.

tischi commented 8 years ago

I think this might be the way to include it directly into java: https://github.com/kaspermarstal/SimpleElastix

axtimwalde commented 8 years ago

@tischi great find!

tischi commented 8 years ago

If possible it would be great to call it directly from java.

Because if you use it via system calls you have to (for each time point and channel):

StephanPreibisch commented 8 years ago

Well, we would have to write a JNI/JNA wrapper, which is relatively straight forward ... let's look into it!

axtimwalde commented 8 years ago

@StephanPreibisch I do not think so, did you have a look at the SimpleElastix project?