Git Product home page Git Product logo

Comments (7)

kaspermarstal avatar kaspermarstal commented on September 28, 2024

There is a small example here. Is there anything you're after in particular?

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on September 28, 2024

Hi Alex, was the example useful? FYI, in case you are working on a Mac, there is an issue with the SimpleITK Java build as mentioned in #25 which will be fixed in the next release. A workaround is referenced in that issue.

from simpleelastix.

alexkarargyris avatar alexkarargyris commented on September 28, 2024

@kaspermarstal Thanks for the great information! I have not been able to install it to my project (Cmake issues). I have a couple of question since I am kind of new:

  1. In the JAVA example how can I get the registration transformation back? I want to apply the transformation on a mask.
  2. What registration methods can I use with SimpleElastix?

Thanks!

By the way I am running Windows so I should not have issues.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on September 28, 2024

Np!

You can warp a mask with the transformix class. Bear in mind I have not run the following code but it looks something like this:

org.itk.simple.ImageFileReader reader = new org.itk.simple.ImageFileReader();
reader.setFileName("movingMask.nii");

org.itk.simple.SimpleTransformix transformix = new org.itk.simple.SimpleTransformix();
transformix.setInputImage(reader.execute());
transformix.setTransformParameterMap(elastix.getTransformParameterMap());

org.itk.simple.Image resultMask = transformix.execute()

As for the kinds of registration methods supported, many of the most common intensity-based registration methods are included. For metrics you have mean squares, normalized correlation, several versions of mutual information, variance over last dimension and a couple of regularization terms such as shape bending energy penalty, rigidity, mass-preserving penalty. These can be combined so you run multiple metrics in the same registration (e.g. mutual information and bending energy penalty). For transforms you have translation, rigid, affine, bspline and thin plate spline and for optimizers you have several gradient descent methods. However, most people (myself included) generally use the adaptive stochastich gradient descent optimization method. There are also several strategies for interpolation, sampling and multi-resolution schemes. The methods are explained in more detail in the SimpleElastix documentation and in the elastix manual. There are no diffeomorphic log-demons or SyN methods etc.

If it all seems a bit daunting, you can use the preconfigured registration method that uses conservative parameters that work well in many cases. To use this method, simply omit passing a parameter map. You can use this as a starting point for configuring the registration procedure for your application. You can see the preconfigured parameters like this:

org.itk.simple.SimpleElastix elastix = org.itk.simple.SimpleElastix();
org.itk.simple.PrettyPrint(elastix.GetParameterMap());

Hope this helps.

What CMake issues are you seeing?

from simpleelastix.

alexkarargyris avatar alexkarargyris commented on September 28, 2024

@kaspermarstal Great help and explanation! I am also probably troubling you with building errors I get on windows and mac. Unfortunately I haven't been able to build the java wrapper to start working with SimpleElastix.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on September 28, 2024

This is a known problem with the SimpleITK Java build. I have submitted a patch to SimpleITK which is included in the next SimpleITK release, after which it will be merged back into SimpleElastix.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on September 28, 2024

Patch has now been merged into SimpleElastix.

from simpleelastix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.