Giter Club home page Giter Club logo

Comments (3)

jefferis avatar jefferis commented on July 26, 2024 2

I think the problem (for R >=4.2) is here over in ANTsRCore:

https://github.com/ANTsX/ANTsRCore/blob/1c79a80c3e03216c2456b0f81d8628dbc91859d7/R/antsRegistration.R#L393-L395

The breaking change in R 4.2.0 is documented in R news as follows:

Calling if() or while() with a condition of length greater than one gives an error rather than a warning. Consequently, environment variable R_CHECK_LENGTH_1_CONDITION no longer has any effect.

I guess you can do something like

if (all(is.na(initx))) { 
   initx = paste("[", f, ",", m, ",1]", sep = "") 
 } 

to ensure that the result is a logical of length 1 or check for whatever else distinguishes between the signalling value of NA vs when initx contains a transform.

from antsr.

muratmaga avatar muratmaga commented on July 26, 2024

Fix works fine, thank you.

I wonder if this needs to be committed to the repo? Because this is going to fail for anyone who has more than items in the transform. if this is a frowned upon thing (i.e., the goal of transformList is only to pass a single transform, like a prior affine), than perhaps documentation needs to be updated.

from antsr.

cookpa avatar cookpa commented on July 26, 2024

In the current implementation, multiple transform files should be allowed, but multiple linear antsTransform objects are not. There's some manipulation of the antsTransform objects that I don't understand, so I've left it alone. But it should support using a vector of file names like my_registration$fwdtransforms. Fixed and documented in #397

from antsr.

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.