Skip to content
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

Use this repository from 3D Slicer #2

Open
cpinter opened this issue Feb 25, 2019 · 5 comments
Open

Use this repository from 3D Slicer #2

cpinter opened this issue Feb 25, 2019 · 5 comments

Comments

@cpinter
Copy link
Contributor

cpinter commented Feb 25, 2019

Currently this library as used from within Slicer (https://github.com/Slicer/Slicer/tree/master/Libs/vtkSegmentationCore), which is a duplication. It would be better to have only one repository to ease maintenance and facilitate dissemination. Considering that this library does not depend on Slicer, and can potentially be used in other projects, it should be this one.

@0xzz
Copy link

0xzz commented May 22, 2019

Does this also entail incorporating the "vtkPlanarContourToClosedSurfaceConversionRule" and "vtkPlanarContourToRibbonModelConversionRule" (from https://github.com/SlicerRt/SlicerRT/blob/master/DicomRtImportExport/ConversionRules/) into PolySeg?

@cpinter
Copy link
Contributor Author

cpinter commented May 22, 2019

It could, but this ticket is about making PolySeg an external module instead of just a sub-directory within the 3D Slicer source code.

We keep those converters (especially the ribbon related ones) in SlicerRT, because they only apply to RT scenarios, and so far PolySeg was only available within Slicer.
I see why it would be useful, my only issue with that is that adding them to PolySeg would add non-generic converters by default part of PolySeg. Maybe I could add those converters but not register them by default (and registering them from SlicerRT or another RT application, which is one line of code each).

@cpinter
Copy link
Contributor Author

cpinter commented May 22, 2019

That said it's very easy to add it for your own purposes. Just add the files to your branch working copy, add them in the CMakeLists.txt as well, register them where the others are registered and you're done.

@0xzz
Copy link

0xzz commented May 22, 2019

@cpinter Thank you. I managed to compile "vtkPlanarContourToClosedSurfaceConversionRule" into my working branch of PolySeg. Just to make sure. Below is what I did - does this look correct to you?

  1. Copy vtkPlanarContourToClosedSurfaceConversionRule.h and vtkPlanarContourToClosedSurfaceConversionRule.cxx into PolySeg source directory

  2. Add vtkPlanarContourToClosedSurfaceConversionRule.cxx and vtkPlanarContourToClosedSurfaceConversionRule.h to PolySeg's CMakeLists.txt

  3. Edit vtkPlanarContourToClosedSurfaceConversionRule.h:

#include "vtkSlicerDicomRtImportExportConversionRulesExport.h"
to
#include "PolySegConfigure.h"

class VTK_SLICER_DICOMRTIMPORTEXPORT_CONVERSIONRULES_EXPORT vtkPlanarContourToClosedSurfaceConversionRule
to
class PolySeg_EXPORT vtkPlanarContourToClosedSurfaceConversionRule

The other two ribbon-related conversion rules depend on "vtkSlicerRtCommon.h" and various Slicer MRML libraries further down the dependency line, so I didn't get them complied into PolySeg. (Fortunately, for my purpose, I only needed the Contour --> ClosedSurface conversion.) I see why those conversions rules have been allocated to the SlicerRT repo, as a way of making sure PolySeg only has very simple dependency requirements.

@cpinter
Copy link
Contributor Author

cpinter commented May 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants