-
Notifications
You must be signed in to change notification settings - Fork 200
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
Python Documentation bug in sitk.Image constructor #1990
Comments
happy to provide a PR, if you agree that this is wrong/misleading. |
Thank you for the report. It looks like the C++ move constructor is what python picked up for the doc strings. That file is generated by manually running a script to convert the C++ Doxygen into the doc strings: This particular methods is not even seen by SWIG, but is enabled when the Doxygen is run. Maybe a separate doxygen run could be done with SWIG defined? Maybe one of those scripts could be updated which generate the Honestly, this doctoring system is a little clunky. SWIG added some support for Doxygen strings, which would be easier, but last I looked at the output it appears inferior to what was currently being produced. It may deserve another look. |
If I understand correctly, the I think the simplest and cleanest way would be to define |
Actually, I think the easiest thing to do would to just ignore this method here: |
Describe the bug
The documentation of
SimpleITK.Image
in the python API saysThis seems to indicate that I should be very careful to not copy an image like so:
I traced this constructor to following C++ code
i.e., the copy constructor
Image::Image(const Image&)
is called.To Reproduce
Look at
SimpleITK.py
in v2.3.0.Expected behavior
The documentation should instead state that
Image(img: Image)
is a copy constructor, i.e. it copies the input imageimg
.Images
na
Additional context
na
The text was updated successfully, but these errors were encountered: