Git Product home page Git Product logo

Comments (12)

kaspermarstal avatar kaspermarstal commented on August 18, 2024

It seems JoinSeriesImageFilter does not have support for 4D images at all. This is a bug. Will fix it.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on August 18, 2024

Hi gattia, JoinSeriesImageFilter should now have support for 4D images. Run git pull in the SimpleElastix source directory and rebuild. Let me know how it goes.

from simpleelastix.

gattia avatar gattia commented on August 18, 2024

Thanks for the fix! That did the trick to running the JoinSeries.

Though, I ended up having issues using it because the images have different origins and slightly different axes. Is this common? I got around it by relaxing the tolerances using these commands:
sitk.ProcessObject.SetGlobalDefaultDirectionTolerance(1)
sitk.ProcessObject.SetGlobalDefaultCoordinateTolerance(1)

I also had to set all of the origins to the same as one of the images. I am assuming these changes aren't best practice? Your example doesn't talk about any of these problems but with using any group for MRI or other data I am assuming it would be the case. What is typical practice?

Thanks,

Anthony.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on August 18, 2024

It is certainly not best practice but I do it myself all the time. I believe the issue is with the origin and direction being slightly modified as they pass through the ITK pipeline, see e.g. this discussion on the ITK mailing list. You may also have to do it after elastix registration (I know I do). I usually just

resultImage.CopyInformation(fixedImage)

because the result image is being transformed to the fixed image domain so these should be equal anyway. The documentation could indeed be improved in this area. You are very welcome to submit a PR, otherwise I will do it when I get the time.

from simpleelastix.

gattia avatar gattia commented on August 18, 2024

Thanks for the response. I will take an attempt at a pull request/edit to that portion of the document. It will be my first :).

Anthony.

from simpleelastix.

pgranger23 avatar pgranger23 commented on August 18, 2024

Hi !

I built SimpleElastix with the latest git version. Nonetheless I experience exactly the same issue that gattia exposed in his first message.
I hope that you will be able to help me,

Pierre

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on August 18, 2024

Did you set the SimpleITK_4D_IMAGES CMake variable to ON?

from simpleelastix.

pgranger23 avatar pgranger23 commented on August 18, 2024

Yes I did.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on August 18, 2024

What is the error message you are seeing?

from simpleelastix.

pgranger23 avatar pgranger23 commented on August 18, 2024

I got the following error for any pixel type :
Traceback (most recent call last): File "dose_tracking_pierre_2.py", line 36, in <module> image = sitk.JoinSeries(image_vector) File "/usr/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 39910, in JoinSeries return _SimpleITK.JoinSeries(*args) RuntimeError: Exception thrown in SimpleITK JoinSeries: /home/pgranger/Documents/Stage_M1/SimpleElastix/Code/Common/include/sitkMemberFunctionFactory.hxx:196: sitk::ERROR: Pixel type: 32-bit signed integer is not supported in 3D byN3itk6simple21JoinSeriesImageFilterE

I just load 3D images and try to Join them in a 4D image.

from simpleelastix.

kaspermarstal avatar kaspermarstal commented on August 18, 2024

Try to pull and rebuild the develop branch and let me know how it goes.

from simpleelastix.

pgranger23 avatar pgranger23 commented on August 18, 2024

I did as you said and it perfectly solved my issue, thank you very much !

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.