[ITK-users] [ITK] SimpleITK and R demons_registration problem

FWagner wagner.h.fabien at gmail.com
Mon Aug 21 13:10:40 EDT 2017


Hi Bradley,
I have tried casting to sitkFloat64, but the same error message :

 Error in f(...) : Exception in SITK - check warning messages In addition:
Warning message:
In f(...) :
  Exception thrown in SimpleITK TransformToDisplacementFieldFilter_Execute:
/tmp/RtmpE4PobR/devtools25774a9d4940/SimpleITK-SimpleITKRInstaller-5f821a0/SITK/Build/SimpleITK-build/Code/BasicFilters/src/sitkTransformToDisplacementFieldFilter.cxx:178:
sitk::ERROR: Unexpected error converting transform! Possible miss matching
dimensions!

do you have a code example of 2D registration involving two png in
simpleITK ? it could help me to test where the problem comes from

Cheers,

Fabien


2017-08-18 19:05 GMT-03:00 Lowekamp, Bradley (NIH/NLM/LHC) [C] [via ITK -
Users] <ml+s7n38644h75 at n7.nabble.com>:

> Have you tried casting to sitkFloat64?
>
> > On Aug 18, 2017, at 12:49 PM, FWagner <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=38644&i=0>> wrote:
> >
> > Hi,
> > I have some trouble using the demons_registration from
> > https://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/
> R_html/66_Registration_Demons.html
> > I have tested the example and it work well. however when i used the
> function
> > demons_registration with two image .png that i have generated i have
> some
> > strange errors. See the R code and the error below
> >
> > # generate two image of a square slighty differents
> > library(raster)
> > library(imager)
> > r=raster(ncol=600,nrow=600)
> > r=setValues(r,1)
> > im1=as.cimg(r)
> > im1[200:300,200:300]=0
> > plot(im1)
> >
> > im2=as.cimg(r)
> > im2[210:320,210:320]=0
> > plot(im2)
> >
> > save.image(im1,"square1.png")
> > save.image(im2,"square2.png")
> >
> > library(SimpleITK)
> >
> > cntrl <- ReadImage("square1.png")
> > img1 = Cast(cntrl,"sitkFloat32")
> > img1
> >
> > cntrl <- ReadImage("square2.png")
> > img2 = Cast(cntrl,"sitkFloat32")
> > img2
> >
> > # the demons_registration function can be downloaded here :
> > https://insightsoftwareconsortium.github.io/SimpleITK-Notebooks/
> R_html/66_Registration_Demons.html
> >
> > tx <- demons_registration(fixed_image = img1, moving_image = img2)
> > Show Traceback
> >
> > Rerun with Debug
> > Error in f(...) : Exception in SITK - check warning messages In
> addition:
> > Warning message:
> > In f(...) :
> >  Exception thrown in SimpleITK TransformToDisplacementFieldFilter_Execute:
>
> > /tmp/RtmpE4PobR/devtools25774a9d4940/SimpleITK-SimpleITKRInstaller-
> 5f821a0/SITK/Build/SimpleITK-build/Code/BasicFilters/src/
> sitkTransformToDisplacementFieldFilter.cxx:178:
> > sitk::ERROR: Unexpected error converting transform! Possible miss
> matching
> > dimensions!
> >
> >
> > Does anyone have an idea of the problem ?
> >
> > Thank you very much,
> >
> >
> > Fabien
> >
> >
> >
> >
> > --
> > View this message in context: http://itk-users.7.n7.nabble.
> com/SimpleITK-and-R-demons-registration-problem-tp38641.html
> > Sent from the ITK - Users mailing list archive at Nabble.com.
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/insight-users
> > _______________________________________________
> > Community mailing list
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=38644&i=1>
> > http://public.kitware.com/mailman/listinfo/community
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://itk-users.7.n7.nabble.com/SimpleITK-and-R-demons-
> registration-problem-tp38641p38644.html
> To unsubscribe from SimpleITK and R demons_registration problem, click
> here
> <http://itk-users.7.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=38641&code=d2FnbmVyLmguZmFiaWVuQGdtYWlsLmNvbXwzODY0MXwzNzIzODczMA==>
> .
> NAML
> <http://itk-users.7.n7.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://itk-users.7.n7.nabble.com/SimpleITK-and-R-demons-registration-problem-tp38641p38645.html
Sent from the ITK - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170821/a629a7b6/attachment.html>


More information about the Insight-users mailing list