Re: [ITK-users] [ITK] SimpleITK and R demons_registration problem
"Lowekamp, Bradley (NIH/NLM/LHC) [C]" <blowekamp-2loH/[email protected]>
| Newsgroups | gmane.comp.lib.itk.user |
|---|---|
| Message-ID | <[email protected]> |
Have you tried casting to sitkFloat64? > On Aug 18, 2017, at 12:49 PM, FWagner <[email protected]> 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 > [email protected] > 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