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

Question: Intensity based registration #104

Open
tischi opened this issue Jun 30, 2016 · 14 comments
Open

Question: Intensity based registration #104

tischi opened this issue Jun 30, 2016 · 14 comments

Comments

@tischi
Copy link

tischi commented Jun 30, 2016

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
Copy link
Member

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
Copy link
Member

StephanPreibisch commented Jul 4, 2016

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
Copy link
Author

tischi commented Jul 5, 2016

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
Copy link
Author

tischi commented Jul 6, 2016

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

@StephanPreibisch
Copy link
Member

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
Copy link
Author

tischi commented Jul 6, 2016

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
Copy link
Author

tischi commented Jul 6, 2016

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

@axtimwalde
Copy link
Member

axtimwalde commented Jul 6, 2016

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
Copy link
Author

tischi commented Jul 6, 2016

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
Copy link
Author

tischi commented Jul 6, 2016

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

@axtimwalde
Copy link
Member

@tischi great find!

@tischi
Copy link
Author

tischi commented Jul 7, 2016

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):

  • load data (e.g. tif or from h5) into imagej
  • save data as .mhd
  • transform via elastix
  • load transformed .mhd into imagej
  • save again (e.g., tif or to h5)
    for 2GB per channel and time point this becomes annoying

@StephanPreibisch
Copy link
Member

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

@axtimwalde
Copy link
Member

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

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