-
Notifications
You must be signed in to change notification settings - Fork 31
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
ShapeWorks Optimize needs some input verification #910
Comments
Thanks, @medakk , good example. We will need to add the nrrd files to our tests (once we have the checks) |
I can share the files which have such clipping. |
+optimize should check whether the provided XML file actually exists. Currently it exits with a vague error:
|
+if the an input filename doesn't exist, optimize should exit immediately. currently it floods the terminal with other diagnostic info and makes it hard to realize the actual problem +if the output dir is /existing_folder/folder_that_doesnt_exist/another_folder_that_doesnt_exist/ optimize just segfaults. check for this |
Not sure if you have covered this scenario in the previous comments.
|
I assume you mean exit, not crash? :) |
@iyerkrithika21 Thanks! @akenmorris Yikes, yes. :'D |
|
When running a use case with segmentations/dt images, if the parameter dictionary has domain type "mesh" then the |
|
+The error for issues with cutting plane input assumes that too few cutting plane inputs were provided, maybe the error could instead state how many were read and how many were expected. Further it does not seem to check whether the length of num_planes_per_input matches the length of cutting_planes.
|
+When using normals in an xml, parameters of use_xyz, mesh_based_parameters, and attribute_scales are needed in addition to use_normals, if not included shapeworks optimize with segmentation fault or not use normals without any error message. |
Another example, if a distance transform gets resampled incorrectly, it can become invalid. For example, we came across a DT generated by some old python/bash scripts with 0.5 isotropic spacing. Inspection of the DT showed that near the 0 level set border, values of 0.308 and then -0.692, these add up to 1.0 and indicate the the DT was generated when the spacing was 1.0. A pixel of -0.692 with spacing 0.5 is telling us the border is more than one pixel away, yet the neighboring pixel says it's 0.308 the other direction. Running Distance Transform from Studio Groom on this correctly fixes is to values such as 0.152 and -0.349 (0.5 between them, matching the spacing). These invalid DTs do not crash ShapeWorks, but they cause it to make nearly zero progress in optimization. The particles bounce around in place and generally can't move. Profiling shows all time is spending following vectors in the gradient image. |
@akenmorris Are there any actionable items for me on this issue? We can discuss this if you like. |
@HeavenlyBerserker , Karthik's comment to you when he added you was:
I assume he means that we would check if the constraint creates unreachable islands? I don't know if we really need to do that, but I suppose we could. |
Yeah, pretty sure that's what he meant. That should be easy and might be useful. I'll do that |
Many users and developers struggle with crashes in ShapeWorks Optimize step that are the result of grooming errors and other input errors. It would be nice if the optimizer did some input verification before running.
Some things that could be checked:
Mesh : confirm mesh is manifold.
Others?
The text was updated successfully, but these errors were encountered: