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] Image(initialized_from_array) += Image crashes #1114
Comments
Working on this today. The good news so far is |
The reason for this failing is a function known to be currently broken. #965 |
# let's compute the mean shape - note that all images have the same reference
# dimensions so no need to worry about different size images and no need for padding
dims = refSeg.dims()
meanShapeAfterAlignment = sw.Image(np.zeros((dims[2], dims[1], dims[0]))) # note the flipped dims
for shapeSeg, shapeName in zip(shapeSegList, shapeNames):
meanShapeAfterAlignment += shapeSeg
meanShapeAfterAlignment /= num_samples is now rewritten as # let's compute the mean shape - note that all images have the same reference
# dimensions so no need to worry about different size images and no need for padding
dims = refSeg.dims()
meanShapeAfterAlignment = shapeSetList[0].copy() # start with a copy of the first shape
# add all the other shapes
for i in range(1, num_samples):
meanShapeAfterAlignment += shapeSegList[i]
# compute their average
meanShapeAfterAlignment /= num_samples |
fixed in pull request #1147 |
@cchriste has this been tested? can we close this issue? |
Please see the comment in the #1073. The fix has long been committed, but it's not been built in a release candidate. |
@akenmorris RC10? |
I'd like to finalize the ellipsoid before creating RC10. See #1162 |
@cchriste RC10 is available. Could you start testing? |
At least on Windows, kernel dies at "#### Comparing mean shapes before & after alignment" when trying to add and average Images.
Here is the stack trace:
The text was updated successfully, but these errors were encountered: