Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the set_x_affine functions public #97

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Make the set_x_affine functions public #97

merged 1 commit into from
Nov 17, 2022

Conversation

nilgoyette
Copy link
Collaborator

We realized while working on a terrible ANTs affine bug that those functions should be public, so that the programmer has more options than this method:

pub fn set_affine<T>(&mut self, affine: &Matrix4<T>)
where
    T: RealField,
    T: SubsetOf<f64>,
    T: ToPrimitive,
{
    // Set affine into sform with default code.
    self.set_sform(affine, XForm::AlignedAnat);

    // Make qform 'unknown'.
    self.set_qform(affine, XForm::Unknown);
}

This is our (Imeka) way of doing things, but it may not be everyone else's way.

@nilgoyette nilgoyette requested a review from Enet4 November 16, 2022 18:23
Copy link
Owner

@Enet4 Enet4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine by me. The documentation on set_sform is a bit thin, but other than that, they are both documented and it should be relatively clear what is meant.

👍

@Enet4 Enet4 merged commit 00a25c0 into master Nov 17, 2022
@Enet4 Enet4 deleted the pub_affine branch November 29, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants