Coder Social home page Coder Social logo

niraluser / shapepopulationviewer Goto Github PK

View Code? Open in Web Editor NEW
2.0 6.0 16.0 2.65 MB

ShapePopulationViewer is a software that allows you to dynamically interact with multiple surfaces at the same time

Home Page: http://www.nitrc.org/projects/shapepopviewer

License: Apache License 2.0

CMake 18.77% C++ 81.23%
3d-slicer-extension 3d-models population visualization color-mapping

shapepopulationviewer's Introduction

ShapePopulationViewer

What is it?

ShapePopulationViewer is a software that allows you to dynamically interact with multiple surfaces at the same time. It is very useful for visualization and comparison of 3D surfaces by also displaying their scalar or vector attributes stored in the points, and allowing the user to easily modify the colormap.

ShapePopulationViewer is available as a 3D Slicer extension.

Build instructions

The extension can be built as a standalone project or as a 3D Slicer extension.

Standalone build

Configure the project using CMake and build it.

3D Slicer extension build

Configure and build the extension following the generic instructions available on the 3D Slicer Developer FAQ.

More information

Find the tool on NITRC

License

See LICENSE

shapepopulationviewer's People

Contributors

agirault avatar allemangd avatar bpaniagua avatar clementmirabel avatar hina-shah avatar jamesfishbaugh avatar jcfr avatar juanprietob avatar laurapascal avatar mleming avatar phcerdan avatar sjh26 avatar vicory avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

shapepopulationviewer's Issues

How to make sure the Launcher executable is properly "fixed-up"

This issue has been created to capture discussion that happen in a private email thread.


1) Question from Clement:

How to link dylib files to the ones in a downloaded version of Slicer and not a built version of Slicer?

2) Answer from @jcfr:

(also adding @bpaniagua and @fbudin69500 in cc to keep them in the loop)

To clarify,

(1) linking is a build time process. Since we do not have a Slicer SDK, generally speaking you can not link against library from a downloaded Slcier

(2) resolving symbols. Are you talking about making sure you distributed extension can load in a Slicer installed on MacOSX.

Assuming you talk about (2), you have to make sure that during the building/packaging of your extension, all executables and libraries are properly "fixed up" so that they can find their dependencies and resolve symbols are run time.

When Slicer CLIs are built using the SEMMacroBuildCLI macro, appropriate link flags are associated with the executable.
See https://github.com/Slicer/Slicer/blob/6d1f4bb820d02c86c865517d7524f3641836ccf4/SuperBuild/External_SlicerExecutionModel.cmake#L28-L32

In your particular case, since you are building the "Launcher" executable yourself and that executable lives in the same directory has the other CLIs, I think you have to have explicitly associated these flags.

Based on how the macro is using these flags, maybe something like this will work for you:

set_target_properties(Launcher PROPERTIES LINK_FLAGS ${SlicerExecutionModel_DEFAULT_CLI_EXECUTABLE_LINK_FLAGS})

3) Comments from @fbudin69500 :

A few pointer to Clement since he is just starting on this project and probably wondering why things were done like this:

  1. There is a launcher because it is not possible to start a QApplication within a QApplication. Slicer is a QApplication, and ShapePopulationViewer is also a QAppication. The launcher creates a "buffer" that allows to run ShapePopulationViewer from within Slicer.

  2. The launcher does not use the SEMMacroBuildCLI probably (not sure anymore) because the macro looks for files with a very specific names. There might be different possible workarounds, like @jcfr's solution, to solve that issues.


4) Question from @fbudin69500 :

Clement, how did you install ShapePopulationViewer in Slicer? Did you add manually the path containing the compiled executable of ShapePopulationViewer to your module path, or did you manually install the packaged ShapePopulationViewer extension from the extension manager?
The executable that has to correct paths to find the libraries at runtime is the one created (and fixed up) by the packaging process, so make sure to test that one. One thing you can do to verify that the executable contains the correct information is to print the information it contains to find the libraries it tries to find. On MacOS, you can use the tool named "otool" [1]. Make sure that the paths to the libraries are relative paths, and not absolute, and the "rpath" is set appropriately. I let you do your own research on what rpath is if you don't know ;)
Hope this helps,

Francois

[1] http://stackoverflow.com/questions/12521802/print-rpath-of-executable-on-osx


5) Answer from Clement:

@fbudin69500 : I packaged ShapePopulationViewer, took the ShapePopulationViewer folder from the package, paste the folder into an Extensions-25586 folder equivalent and add the path to the extension into Slicer.
The libraries not found were QtGui, QtCore and QtWidget but were indicated without @rpath, so I used install_name_tool to change it to @rpath/Frameworks/QtCore.framework/Versions/4/QtGui as it is in a downloaded version Slicer.
Then, no problem with Libraries but with Symbols not found:
unnamed


6) Answer from @fbudin69500 :

Reading at this quickly I have 2 things to say:

  1. Instead of copying ShapePopulationViewer from the package and changing the module path, just manually install the package, it is easier: When you open the extension manager, you have a little wrench icon. If you click on it, it gives you the options to install the extension from file (your zip file).

  2. The fix-up step when creating the package should normally take care of this rpath problem.

  3. I don't know why it doesn't find your symbol :)


7) Answer from Clement:

I know about installing a package, I previously did it for an other extension I have developed but for ShapePopulationViewer there is an error installing the package:

unnamed

So, I just used the second option I had to just move the files.

What is the fix-up step you are talking about ?


8) Answer from @fbudin69500 :

I am not sure why the install fails for ShapePopulationViewer but works for another extension.
The fix-up step changes the path to the libraries that the software is looking for to work from within Slicer.

This is the short version. @jcfr might be able to give a better explanation.

Drag&Drop not available for new MacOS versions with SlicerExtension build

New versions of Mac doesn't allow to drag and drop into ShapePopulationViewer when the module is built as SlicerExtension.

  • Reason:
    New versions of MacOS encode dropped files URL into "/.file/id=xxxxx.xxxx". So, the function ToLocalFile provided by Qt4.8 doesn't return the correct QUrl.
  • Solutions tried:
    Use Qt5 instead of Qt4 but Slicer is not yet using Qt5 => Conflicts while building.

This is an essential feature asked by clinicians.

Uploading model into shape population viewer taking longer than usual

Hi there,
When uploading VTK models into the Shape Population Viewer 3D slicer becomes unresponsive and takes approx 10 mins to load before I can view and manipulate the models. I have tried using a smaller file (e.g. just mandible compared to entire face) and it doesn't seem to make a difference.
In addition, manipulating the colours and ranges seems to be bugged - it doesn't respond like it did in the past. I cannot add additional points. Any help would be most appreciated.
Thank you!

Fix build error when building against VTK9

See https://slicer.cdash.org/index.php?project=SlicerPreview&date=2021-03-10&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=ShapePopulationViewer

D:\D\P\S-0-E-b\ShapePopulationViewer\src\vtkPVPostFilter.h(37,61): error C3646: 'VTK_OVERRIDE': unknown override specifier [D:\D\P\S-0-E-b\ShapePopulationViewer-build\src\ShapePopulationViewerWidget.vcxproj]
src/customizeColorMapByDirectionDialogQT.h:33:25: fatal error: QVTKWidget.h: No such file or directory

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.