Ingen beskrivning

Andrej Studen d2fcd1887e Update 'README.md' 1 år sedan
slicerModules 2507dd4d3b Changing location of loaded libraries to slicer directory to separate nixSuite paths from local paths 2 år sedan
slicerScripts 3abd1ebea2 Adding a version of runSlicer, runSlicerFg.sh that waits for end of execution 1 år sedan
utils a6fe87679d Removing resample.py from labkey interface 3 år sedan
CMakeLists.txt b8d4088ab1 Update CMakeLists.txt to reflect new directory structure 5 år sedan
LICENSE 5a27e2e8c6 Add LICENSE 5 år sedan
Labkey.png c40d238590 Initial import 7 år sedan
README.md d2fcd1887e Update 'README.md' 1 år sedan
networkConfig.json.sample 908b0a812d Adding a networkConfig sample 5 år sedan

README.md

Slicer-Labkey extension

This package allows user to connect to a labkey server through a slicer interface.

Cloning

Since there is no master branch, git clone will report

warning: remote HEAD refers to nonexistent ref, unable to checkout.

Which is just a warning. Simply move to SlicerLabkeyExtension directory and checkout the SlicerExtensionIndex branch.

Use in Slicer

To use, add path to unpackaged labkeySlicerPythonAPI/labkeySlicerPythonExtension to Additional module paths in Slicer->Edit->Application Settings->Modules submenu. You'll also need the SlicerLabkeyDICOMtools package, also available from wiscgit.

Then the package will appear under LabKey.

labkeyBrowser

If you are interested in the code, you should look at slicerNetwork.py which implements the communication with the server and forms HTTP Labkey API commands.

More details and tutorial can be found at: http://www-f9.ijs.si/~studen/blogs/posts/2017/May/31/slicerlabkey-integration/

DICOMtools

A set of tools that provide DICOM loading from a remote, labkey controlled database. Most significant difference from native Slicer DICOM libraries is that no local database is used as the files are tracked by LabKey database, and that files do not neccesarily exist on local storage.

Loading DICOM files

In particular, functions like load(self,net,path) are implemented where net referrs to the server setup (slicerNetwork instance of SlicerLabKeyPythonAPI) and path is a relative path to a remote file. Two implementations were made,

  • importDicom that uses pydicom. Use Connection button (blue frame) to specify connections, add path on a specified LabKey site text box (cyan), provide filter as a JSON object in a text file (gold) and a button to load the remote DICOM directory as a node (red). Multiple nodes will be created if multiple DICOM series are in the target directory. To select, use filter window and specify seriesUUID or similar tags. Minimal settings require a single field with the content SeriesLabel and a key which should be a valid DICOM tag name with the first letter in small case. importDICOM

  • loadDicom that is based on DICOMLib and Slicer embedded DCMTK tools. Using SlicerRT, the program is able to load contours from DICOM-RT files, started by pushing on the pink button. The green framed button loads mixed content of volumes and segmentations. loadDICOM

Uploading DICOM files

In particular workflows, vtkMRMLVolumeNodes created through data manipulation must be stored remotely in DICOM format for validation in other image software tools (like review by clinicans at dedicated work-stations). exportDicom has a function exportNode, which uploads a named node to a DICOM directory in LabKey, using unique UUID generated from baseUUID that has to be provided by the user. Use services such as FreeDICOM to generate your own unique UUID.

exportDICOM