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
ENH: Minor presentation enhancement to AffineMap object #1442
Comments
This also calls for implementation of other useful magic methods such as composite = rigid*affine
composite.transform(moving) which otherwise needs to be achieved with affine.transform(rigid.transform(moving)) Maybe, the composition of multiple transformations is implemented elsewhere? |
Hi @raamana, thank you for this nice issue :-) I think you can create a PR concerning Concerning transformation composition, it is a great idea but we need to think a little more about it. I really would like to have @omarocegueda opinion with this point. Indeed, more intuitive manner can be more confusing too. We will get back to you ASAP. |
Concerning |
I don't remember the details, but I bet it was something to do with : https://github.com/nipy/nibabel/wiki/property_manifesto In this case, if you modify the values in place, it won't affect the return value, which breaks the 'like an attribute' contract. So this isn't too surprising:
This is more suprising:
|
Wow, thank you @matthew-brett, really nice information. Now, I will pay more intention for this feature |
Sure @skoudoro, I will send in a PR for Yeah, implementing the composition needs to be discussed carefully.. PS: broadening the scope to even to a much higher-level, this also calls for a standalone registration library, serving all the nipy or scipy ecosystem.. I'm aware of |
Hi @matthew-brett , I'm not sure I am following you 100%. As we all know, the get/set behaviour of the attribute or the property would ultimately depend on implementation details.. If we choose to return "value" of the attribute in getter (instead of a reference), changes to it outside the object wouldn't be reflected in subsequent getter calls. if that use case is important, we can choose to return the reference, this needs to be discussed though. |
Yes, sure, if you return a reference, and you're happy for that to be modified outside the object, then a property is fine, because it will then behave like an attribute. |
We are in discussion of different strategy @raamana. Expect the unexpected :-) For the moment, Let's focus on the PR |
On Mon, Mar 5, 2018 at 8:44 AM, Serge Koudoro ***@***.***> wrote:
PS: broadening the scope to even more very high-level, this also calls for
a standalone registration library, serving all the nipy or scipy
ecosystem.. I'm aware of nireg, and I know you guys have discussed this
before at length.. Not trying to open it up again, linking the need for
broad approach for registraion in the python ecosystem.
We are in discussion of different strategy @raamana
<https://github.com/raamana>. Expect the unexpected :-)
Where is that discussion taking place? I would love to be able to weigh in
on this. I have been supporting several groups that are using the Dipy
registration tools outside of a diffusion MRI context, and would like to be
able to anticipate further developments. Telling my collaborators to
"expect the unexpected" is unlikely to make them feel comfortable (I know
-- you were probably only joking).
For the moment, Let's focus on the PR
…
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1442 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAHPNoKm0HpyYs4ozjlzVxjlnm1lBkyaks5tbWtrgaJpZM4SbWtc>
.
|
I've made an issue for the registration discussion #1444 . |
I have been recently discussing with Elef about this @arokem. Nothing that you already don't know. But we should talk about this again. The viz project will be independent first. |
OK -- great! It sounded so ominous when you said it that way... Would we split out the viz module on the next release cycle? I guess we can pick that discussion up once we have this one out. Looks like it's pretty close! |
So, when we define And, if we decide to keep it, we should decorate it with |
fixed by #1445, closing |
Description
Hello Everyone, thanks for
dipy
, and the registration parts of it, which I'm starting to play with it. As I tried to follow the example, I realized printing the AffineMap instance does not print the matrix, but its class/ref info:which was not the intuitive, and with
dir(affine)
I figured I need to doaffine.affine
and there is noaffine.get_affine()
which I'd expect when a corresponding setteraffine.set_affine()
is defined:So I suggest we implement the
__format__
and__str__
for this object, and similar objects, and defineAffineMap.get_affine()
or aAffineMap.get_matrix()
to make it more intuitive and complete.This is not an issue or bug, and would not affect the functionality at all, just a minor suggestion. Please close it if this has been discussed already (my search didn't reveal so). Happy to send in a PR if considered helpful.
The text was updated successfully, but these errors were encountered: