Code Monkey home page Code Monkey logo

Comments (16)

lassoan avatar lassoan commented on August 11, 2024 1

The Sandbox extension failed to build last night (http://slicer.cdash.org/build/2144222/configure), I've tried to reorganize the build tree, hopefully the build will succeed tonight.

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024 1

See slide 7 of this tutorial: https://www.slicer.org/wiki/Documentation/Nightly/Training#PerkLab.27s_Slicer_bootcamp_training_materials

The correct syntax for scripted modules is: slicer.modules.combinemodels.widgetRepresentation().self().logic

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024 1

I got the example files from @mauigna06. Operations involving the cylinder models were failed because they were not triangle meshes (the base and top were polygons):

image

After triangulating the surface, everything worked correctly. I used Surface Toolbox module's Decimation method (reduction set to 0.0) because I did not want to spend time with scripting, but most probably you can simply run vtkTriangleFilter.

image

I've also noticed that the curved surface consisted of extremely ill-shaped triangles. If you want to create such long cylinders then you can create a centerline using vtkLineSource and vtkTubeFilter.

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024 1

Thanks you Andras. I'll redo the function to create cylinders

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024

Please try replacing line 32 in CombineModels.py to:

logicPath = os.path.realpath(os.path.join(os.path.dirname(__file__), '../qt-loadable-modules/'+subfolder)).replace('\\','/')

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

Hi Andras. Thank you for answering. I didn't install the extension from the extension manager. I just cloned the Github repository and added "CombineModels" to the additional module paths. I did this because the Sandbox extension from the extension manager wasn't updated and it didn't have the CombineModels Module
(that line change didn't solve the error, it keeps appearing)

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

Thanks for the help. That line change didn't solve the error, it keeps appearing. (I make this comment because I think Github won't tell you that I edited the comment above to tell you I tested the line change)

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024

You either need to build the extension yourself (you need to build Slicer first) or install the pre-built extension from the extension manager.

You need the very latest (today's) Slicer Preview Release.

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024

What operating system do you use?

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

Windows 10 x64

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

You either need to build the extension yourself (you need to build Slicer first) or install the pre-built extension from the extension manager.

You need the very latest (today's) Slicer Preview Release.

I did try to install it today from the extensions manager wiith latest preview release but I'll try again tomorrrow

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

I was able to install the updated Sandbox extension from the extensions manager. I tried it with 2 cylinders, with the fibula model and the mandible model and with the fibula model and one cylinder. Union operation didn't work with any. Intersection operation worked with the fibula model and the mandible model, and with the fibula model and one cylinder. Difference operation worked with the fibula model and the mandible model, and with the fibula model and one cylinder.
This observations suggest that the Combine Models module is a bit unstable but maybe good enough for using difference operation between the surgicalGuideBase and a (cylinder or sawBox)

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024

Great! Please report the bug at https://github.com/zippy84/vtkbool/issues (describe the context of the work so that the author knows that it is an important project and provide download link to the input meshes that you have trouble with, and include any VTK error message that Slicer logs when you run the processing).

In parallel, you can try to reduce, clean, and simplify the input data sets and compute normals to see if it makes any difference. You can do all these using Surface Toolbox module.

If vtkbool is not reliable then we can import all models into a segmentation and perform Boolean operations there.

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

I wasn't able to recreate all the bugs that I had the first time. Now I only have bugs when I try boolean operations on simple meshes like cylinders or sawBoxes. Now vtkbool appears to work well when both meshes are complex. Do you still think I should post the issue?

from slicerbonereconstructionplanner.

mauigna06 avatar mauigna06 commented on August 11, 2024

Hi Andras.
I have problems getting the combineModelsLogic. Neither of these lines work (you cannot access the process function):
combineModelsLogic = slicer.modules.combinemodels.logic()
combineModelsLogic = slicer.modules.combinemodels.logic

This line works only after I open the "Combine Models" module:
combineModelsLogic = slicer.modules.CombineModelsWidget.logic

from slicerbonereconstructionplanner.

lassoan avatar lassoan commented on August 11, 2024

Now vtkbool appears to work well when both meshes are complex. Do you still think I should post the issue?

Send me model pairs that do not work. I can give it a try if I can make it work with some cleaning, etc. and if I cannot figure it either then you can send the bug report.

from slicerbonereconstructionplanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.