Skip to content

Commit

Permalink
Merge branch 'ALive-research:develop' into feature/Resectogram-Resect…
Browse files Browse the repository at this point in the history
…ionVolumetry
  • Loading branch information
RuoyanMeng authored Oct 9, 2024
2 parents 2ccac63 + 6295b47 commit 49ca1ec
Show file tree
Hide file tree
Showing 53 changed files with 997 additions and 207 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
# This should be the path to the paper within your repo.
paper-path: Paper/paper.md
- name: Upload
uses: actions/upload-artifact@v4
with:
name: paper
# This is the output path where Pandoc will write the compiled
# PDF. Note, this should be the same directory as the input
# paper.md
path: Paper/paper.pdf
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ project(SlicerLiver)
set(EXTENSION_HOMEPAGE "https://github.com/ALive-research/Slicer-Liver")
set(EXTENSION_CATEGORY "IGT")
set(EXTENSION_STATUS "Beta")
set(EXTENSION_CONTRIBUTORS "Rafael Palomar (Oslo University Hospital / NTNU), Ole Vegard Solberg (SINTEF), Geir Arne Tangen (SINTEF), Egidijus Pelanis (Oslo University Hospital), Davit Aghayan (Oslo University Hospital), Gabriella D'Albenzio (Oslo University Hospital) Javier Pérez de Frutos (SINTEF), Ruoyan Meng (NTNU), Héctor Martínez (Universidad de Córdoba), Francisco José Rodríguez Lozano (Universidad de Córdoba), Joaquín Olivares Bueno (Universidad de Córdoba), José Manuel Palomares Muñoz (Universidad de Córdoba)")
set(EXTENSION_CONTRIBUTORS "Rafael Palomar (Oslo University Hospital / NTNU), Ole Vegard Solberg (SINTEF), Geir Arne Tangen (SINTEF), Egidijus Pelanis (Oslo University Hospital), Davit Aghayan (Oslo University Hospital), Gabriella D'Albenzio (Oslo University Hospital) Javier Pérez de Frutos (SINTEF), Ruoyan Meng (NTNU)")
set(EXTENSION_DESCRIPTION "3D Slicer extension for liver analysis and therapy planning")
set(EXTENSION_ICONURL "https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/SlicerLiver.png")
set(EXTENSION_SCREENSHOTURLS "https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_01.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_02.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_03.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_04.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_05.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_06.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_07.png https://raw.githubusercontent.com/ALive-research/Slicer-Liver/master/Screenshots/Slicer-Liver_screenshot_08.png")
set(EXTENSION_DEPENDS
Markups
SlicerVMTK
SegmentEditorExtraEffects
ExtraMarkups
)

#-----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions LiverMarkups/VTKWidgets/vtkBezierSurfaceSource.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void vtkBezierSurfaceSource::ComputeBinomialCoefficients()
unsigned int yGrid = this->NumberOfControlPoints[1];

#pragma omp parallel for
for (int i=0; i<xGrid; i++)
for (unsigned int i=0; i<xGrid; i++)
{
this->BinomialCoefficientsX[i] =
Factorial(xGrid-1) /
Expand All @@ -393,7 +393,7 @@ void vtkBezierSurfaceSource::ComputeBinomialCoefficients()
if (xGrid != yGrid)
{
#pragma omp parallel for
for (int i=0; i<yGrid; i++)
for (unsigned int i=0; i<yGrid; i++)
{
this->BinomialCoefficientsY[i] =
Factorial(yGrid-1) /
Expand All @@ -403,7 +403,7 @@ void vtkBezierSurfaceSource::ComputeBinomialCoefficients()
else
{
#pragma omp parallel for
for (int i=0; i<xGrid; i++)
for (unsigned int i=0; i<xGrid; i++)
{
this->BinomialCoefficientsY[i] = this->BinomialCoefficientsX[i];
}
Expand Down Expand Up @@ -436,7 +436,7 @@ void vtkBezierSurfaceSource::EvaluateBezierSurface(vtkPoints *points)
unsigned int yRes = this->Resolution[1];

#pragma omp parallel for
for (int i=0; i<xRes; i++)
for (unsigned int i=0; i<xRes; i++)
{
double u;
u = i / static_cast<double>(xRes - 1);
Expand Down
4 changes: 2 additions & 2 deletions LiverMarkups/VTKWidgets/vtkBezierSurfaceSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class VTK_SLICER_LIVERMARKUPS_MODULE_VTKWIDGETS_EXPORT vtkBezierSurfaceSource :
* @param os ouptut stream to print the properties to.
* @param indent indentation value.
*/
void PrintSelf(ostream &os, vtkIndent indent);
void PrintSelf(ostream &os, vtkIndent indent) override;

/**
* Set the control points.
Expand Down Expand Up @@ -164,7 +164,7 @@ class VTK_SLICER_LIVERMARKUPS_MODULE_VTKWIDGETS_EXPORT vtkBezierSurfaceSource :
*
* @return return code.
*/
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override;

private:
vtkBezierSurfaceSource(const vtkBezierSurfaceSource&); // Not implemented.
Expand Down
8 changes: 4 additions & 4 deletions LiverResections/MRML/vtkMRMLLiverResectionNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class VTK_SLICER_LIVERRESECTIONS_MODULE_MRML_EXPORT vtkMRMLLiverResectionNode
vtkMRMLCopyContentDefaultMacro(vtkMRMLLiverResectionNode);

/// Create default storage node or nullptr if does not have one
vtkMRMLStorageNode* CreateDefaultStorageNode();
vtkMRMLStorageNode* CreateDefaultStorageNode() override;


// TODO: Review the need for this further down the road
Expand Down Expand Up @@ -371,16 +371,16 @@ class VTK_SLICER_LIVERRESECTIONS_MODULE_MRML_EXPORT vtkMRMLLiverResectionNode
bool GridVisibility;
float GridDivisions;
float GridThickness;
bool Grid3DVisibility;
bool ShowResection2D;
bool EnableFlexibleBoundary;
bool Grid2DVisibility;
double HepaticContourThickness; //Resection margin in mm
double PortalContourThickness; //Uncertainty margin in mm
float HepaticContourColor[3];
float PortalContourColor[3];
int TextureNumComps;
bool EnableFlexibleBoundary;
bool MirrorDisplay;
bool Grid3DVisibility;
bool Grid2DVisibility;

private:
vtkMRMLLiverResectionNode(const vtkMRMLLiverResectionNode&);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ vtkMRMLLiverResectionsDisplayableManager2D

// Description:
// VTK-specific function for print out information
void PrintSelf(ostream& os, vtkIndent indent);
void PrintSelf(ostream& os, vtkIndent indent) override;

protected:

Expand All @@ -92,12 +92,12 @@ vtkMRMLLiverResectionsDisplayableManager2D

// Description:
// MRML virtual functions
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene);
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData);
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *node);
virtual void OnMRMLNodeModified(vtkMRMLNode *node);
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *node);
virtual void OnMRMLSceneEndClose();
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene) override;
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData) override;
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *node) override;
virtual void OnMRMLNodeModified(vtkMRMLNode *node) override;
virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode *node) override;
virtual void OnMRMLSceneEndClose() override;

protected:

Expand All @@ -120,4 +120,4 @@ vtkMRMLLiverResectionsDisplayableManager2D

};

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ vtkMRMLLiverResectionsDisplayableManagerHelper2D::
//---------------------------------------------------------------------------
void vtkMRMLLiverResectionsDisplayableManagerHelper2D::
PrintSelf(ostream &os,
vtkIndent vtkNotUsed(indent))
vtkIndent indent)
{

this->vtkObject::PrintSelf(os, indent);
}

//---------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ vtkMRMLLiverResectionsDisplayableManagerHelper2D

// Description:
// VTK-specific function for printing information
void PrintSelf(ostream &os, vtkIndent indent);
void PrintSelf(ostream &os, vtkIndent indent) override;

// Description:
// Add surface contour to the 2D views
Expand Down
23 changes: 23 additions & 0 deletions LiverSegments/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,29 @@ slicerMacroBuildScriptedModule(
WITH_GENERIC_TESTS
)


# #-----------------------------------------------------------------------------
# set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")

# set(MODULE_INCLUDE_DIRECTORIES
# ${CMAKE_CURRENT_SOURCE_DIR}/Logic
# ${CMAKE_CURRENT_BINARY_DIR}/Logic
# )

# #-----------------------------------------------------------------------------
# slicerMacroBuildLoadableModule(
# NAME ${MODULE_NAME}
# TITLE ${MODULE_TITLE}
# EXPORT_DIRECTIVE ${MODULE_EXPORT_DIRECTIVE}
# INCLUDE_DIRECTORIES ${MODULE_INCLUDE_DIRECTORIES}
# SRCS ${MODULE_SRCS}
# MOC_SRCS ${MODULE_MOC_SRCS}
# UI_SRCS ${MODULE_UI_SRCS}
# TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
# RESOURCES ${MODULE_RESOURCES}
# # WITH_GENERIC_TESTS
# )

#-----------------------------------------------------------------------------
if(BUILD_TESTING)

Expand Down
Loading

0 comments on commit 49ca1ec

Please sign in to comment.