-
Notifications
You must be signed in to change notification settings - Fork 203
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
Add renamed const buffer access methods to C# interface. #961
Add renamed const buffer access methods to C# interface. #961
Conversation
df74b21
to
2f78607
Compare
I've tested this fix and it works. This resolves the problems raised in issue #961. |
@@ -43,6 +43,24 @@ | |||
%CSharpTypemapHelper( float*, System.IntPtr ) | |||
%CSharpTypemapHelper( double*, System.IntPtr ) | |||
|
|||
|
|||
// CSharp does not hadle overloaded const methods. So they are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'handle'
2f78607
to
cec52f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor edit on code comment.
// explicitly renamed to enable their explicit usage. These methods | ||
// assume that the buffer is will not be modified, so MakeUnique is | ||
// not call. | ||
%rename("GetConstBufferAsInt8") itk::simple::Image::GetBufferAsInt8( ) const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// assume that the buffer is will not be modified, so MakeUnique is
// not call.
change to:
// assume that the buffer will not be modified, so MakeUnique is
// not called.
The implicit modification of the sitk::Image by calling MakeUnique in the GetBufferAs.. methods can cause problem in with multi-threader. See issue SimpleITK#958 for more details.
cec52f2
to
8054ae5
Compare
The implicit modification of the image by calling MakeUnique can cause
problem in with multi-threader. See issue #958 for more details.