Code Monkey home page Code Monkey logo

slicerdmri's Introduction

SlicerDMRI

GitHub release Build, test GitHub release

Diffusion MRI in 3D Slicer open-source medical imaging software

CDash for extensions: http://slicer.cdash.org

For publications please include this text (modifying the initial part to describe your SlicerDMRI use case):

"We performed diffusion MRI and/or tractography analysis and/or visualization in 3D Slicer (https://www.slicer.org) via the SlicerDMRI project (https://dmri.slicer.org/), funded by NIH U01 CA199459."

slicerdmri's People

Contributors

ayarmarkovich avatar chrismullins avatar cpinter avatar finetjul avatar ihnorton avatar jamesobutler avatar jcfr avatar jhlegarreta avatar lassoan avatar ljod avatar mikebind avatar msmolens avatar naucoin avatar pieper avatar simonoxen avatar sjh26 avatar vovythevov avatar zhangfanmark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

slicerdmri's Issues

DWI Weighted Masking

The Diffusion Weighted Volume Masking is generating an error message when tested with the DWI tutorial dataset.

Input port 0 of algorithm vtkImageWeightedSum(0x10f70b440) has 0 connections but is not optional.

/Applications/Slicer.app/Contents/lib/Slicer-4.5/cli-modules/DiffusionWeightedVolumeMasking: Error parsing Diffusion information, no B0 images

Diffusion Weighted Volume Masking completed with errors

Steps to reproduce the bug:

  1. Load the DWI tutorial dataset in Slicer
  2. Select the module Diffusion Weighted Volume Masking
  3. Set input volume --> dwi.nrrd
  4. Set OutputVolume and OutputThresholdMask to 'Create New'
    5.Set Otsu Threshold to 0.05
  5. Uncheck 'Remove Islands'

dwi-mask

Adding icon on Slicer menu

Hi,

The icon displayed next to 'Install Slicer DMRI tools' in the Modules menu is the generic icon.

Could this be replaced by the SlicerDMRI extension icon for consistency purpose?

Sonia

screen shot 2016-11-07 at 10 54 43 am

Re-architect display node infrastructure

  • Duplicated code. See http://na-mic.org/Mantis/view.php?id=2336 Consolidate enumeration of tensor math and display scalar invariants. Perhaps we need one file to define many scalar invariants, as these will be extended. Also some are not used.
  • Display node architecture is complex. Node references have an extra layer. Tractography->Display->Tensor Properties and also Color, etc. Lots of bookkeeping for creation/deletion.
  • Currently, tractography goes through the Models Display Manager. To remove this dependency, make a Tractography Display Manager.
  • Implementing hierarchy in Tractography Display "approx 1 month Alex time"

ensure no remaining dMRI dependency in Slicer core

Check if there are any hard-coded things inside the Models module and elsewhere for if it is a FiberBundle node. Apparently nothing links to FiberBundle classes, just tests strings for equality to node type. Is this always safe?

BUG: FB measurement outputs nothing when there is not tensor data

The current version outputs nothing if there is no tensor data in the vtk. We need to output the information such as NumFiber and NumPoint, with/without tenors.

This can be fixed by moving the following two lines before if( !setTensors(data) ):

computeFiberStats(data, fileName);
computeScalarMeasurements(data, fileName, EMPTY_OP, moreStatistics);

https://github.com/SlicerDMRI/SlicerDMRI/blob/master/Modules/CLI/FiberTractMeasurements/FiberTractMeasurements.cxx#L968-L976

https://github.com/SlicerDMRI/SlicerDMRI/blob/master/Modules/CLI/FiberTractMeasurements/FiberTractMeasurements.cxx#L990-L999

Remove extra/unused branches

The following branches which were most likely for sake of experimentation while setting up the initial layout could be removed:

  • ddd
  • master3
  • master4
  • master5

Inconsistent IJK point coordinate conversions between modules

Hi all,

Lauren and I just noticed that after transforming RAS point to IJK point, the FLOOR operation is used to get the integers of (i, j, k) in the FiberBundleLabelSelect module but ROUND is used in the FiberBundleToLabelMap module. This could generate half voxel difference between the two modules.

Improve rendering of FA volumes and other scalar volumes from dMRI

Rendering of FA volumes and other scalar volumes from dMRI requests from Ron

W/L (Volumes module) and custom transfer function (Volume rendering module) presets for FA images (like in CT and PET), as they are scaled between 0 and 1. Use the same rainbow LUT as the one used for coloring the streamlines
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0ahUKEwjJ-eHwnvnKAhVPSZoKHb_iAusQFgg3MAQ&url=ftp%3A%2F%2Fmedical.nema.org%2Fmedical%2Fdicom%2Ffinal%2Fcp1264_ft.doc&usg=AFQjCNF_EYGr99XHaxjFAmbj-4nL66P24Q&cad=rja contains potentially pertinent information from the DICOM world.

Prerequisite to the previous: Fix Volume rendering transfer function to allow setting thresholds for transfer functions at fractional values Such as 0.15. See bug report http://na-mic.org/Mantis/view.php?id=4152

Slicer "harden" transform fails for DWIs

The Slicer "harden" button (in the Transforms module) does not handle the DWI gradients correctly.

This resample functionality "may" be present in the resample scalar/vector/DWI, but this seems to fail currently.

Make WMA usable with/from Slicer

Tracking issue for this.

Option 1: use existing Python code within Slicer Python. Requires following dependencies:

  • vtk, mrml, numpy
  • Cython
  • scipy: stats, cluster, optimize
  • statsmodels
  • multiprocessing (any Slicer thread issues? will run as CLI)
  • joblib
  • xlrd

Option 2: use existing Python code, but call external Python install from Slicer.

Option 3: port expensive parts of code to VTK/ITK. Advantage: potentially faster, and reduces Python dependencies (OTOH, makes WMA dependent on Slicer ecosystem).

Add FB length measurement tool

Either in TractographyDisplay or FiberTractMeasurements (possibly both).

Also consider adding some volume measurement (intersected voxels? envelope?)

Check all GUI and help improvements for clarity

Sonia, please check and test the following improved things in SlicerDMRI before you come to Slicer day on Aug 30, 2016. Please share your per-module and overall feedback in a google document.

Improvements to check:
-- Overall module category reorganization for Diffusion.
-- Module changes: names, categories, GUI labels and descriptions (tooltips).
-- All module help pages.

Specific modules to be checked are listed below:
DiffusionTensorEstimation
DiffusionBrainMasking
DiffusionTensorScalarMaps
TractographyMeasurements
Tractography Seeding
Tractography ROI Seeding
Tractography ROI Selection
UKFTractography
Tractography To Mask Image
DiffusionWeightedDICOMImport (DWIConvert)

nightly testing for diffusion tensor calculation

this should run the module for tensor estimation and check the output is correct (has not changed from previous output)

this should use test data for example the helix dataset, and/or a small real dataset ( a few slices) provided by Isaiah

fiber tract scalar measurements appears not to preserve full hierarchy tree structure

To do statistics, it's appropriate to focus on one level, like for example subdivisions of the corpus callosum. The hierarchy has a tree structure that can have several levels. However when I read the measurements file into python, the name of each measurement seems to preserve only two levels of the hierarchy it is nested inside, instead of the unique full name. Here's an example from our tests. Looks like there is a possible CC with several levels inside it, and at each level only the current level and the parent are listed. In theory I could try to reconstruct the tree structure, but it would be much better for Slicer to output the full name including parents up to the root node that is being measured.

['Possible CC', 'Possible CC:complete CC medial and later', 'Possible CC:nonhomologue', 'complete CC medial and later:region I', 'complete CC medial and later:region II', 'complete CC medial and later:region III', 'complete CC medial and later:region V', 'complete CC medial and later:region VI', 'nonhomologue:anterior', 'nonhomologue:mid', 'nonhomologue:posterior']

nightly testing for diffusion tensor scalar measures

this should run the module for scalar measures and check the output is correct (has not changed from previous output). All measures should be checked (FA, eigenvalues, etc.)

this should use test data for example the helix dataset, and/or a small subset of a real dataset ( a few slices) provided by Isaiah

DiffusionTensorDisplayPropertiesNode does not serialize correctly

Inherits from vtkColorTableNode, but does not save associated ctbl for the ColorStorageNode, when writing MRML, leading to load errors.

ERROR opening colour file /tmp/foo/DiffusionTensorDisplayProperties.ctbl
ERROR opening colour file /tmp/foo/DiffusionTensorDisplayProperties_1.ctbl
ERROR opening colour file /tmp/foo/DiffusionTensorDisplayProperties_2.ctbl
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c917cee0) has 0 connections but is not optional.
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c917cee0) has 0 connections but is not optional.
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c917cee0) has 0 connections but is not optional.
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c6459990) has 0 connections but is not optional.
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c6459990) has 0 connections but is not optional.
Input port 0 of algorithm vtkExtractSelectedPolyDataIds(0x7f82c6459990) has 0 connections but is not optional.

Reproduce: open FiberBundle VTK/VTP file (alone), save MRML scene, re-load MRML scene.

(Low priority since it doesn't have an adverse impact, but noting for eventual fix)

Noticed in test MRML file for #19.

problem with Trace measurement from fiber tracts and Spherical Measure

In the text measurement files output from Slicer, there are many more NAN values for trace than there should be. In many clusters, all three eigenvalues are reported, yet Trace is listed as NAN. This is impossible, because if all three eigenvalues exist their sum should be the trace.

This must be a bug.

More observations: Often the Spherical Measure is NAN as well, indicating an issue. But it is not NAN every time Trace is NAN. Also, when tensor1 trace is NAN, tensor 2 trace may exist, and vice versa. This was seen with 2-tensor UKF tractography.

Native DICOM tractography

  • DICOM contains more information than we currently support, which must not be lost
  • Currently this information is in MRML (visualization) and vtkPolyData (data).
  • Should visualization information changes really modify the input tractography file? In the case of images, DICOM data are not usually modified and are considered more read-only from the scanner. However in this case, saving the data with a color change would change the tractography file.

Update NRRD standard to explicitly store B-values

The current NRRD DWI encoding scheme has caused several issues due to misunderstanding of the gradient scaling scheme. The scheme also conflates two different kinds of scaling (scaling by maximum length, and scaling to represent B-value), which makes implementation difficult. We should consider updating the encoding scheme to explicitly encode the gradient directions as Nifti does. It should be possible to do this in a backwards-compatible way by retaining the nominal DWMRI_b-value:=700 tag, and adding a DWMRI_bvalue_0010:=BVAL tag corresponding to each DWMRI_gradient_0010:=x y z tag.

Improve DWVolumeMasking UX, reusability, testing

Feedback from SP tractography tutorials:

  • Otsu thresholding is hard to use, often need to set high (0.9) threshold and then erode/dilate to get usable mask.
  • Otsu has issues with some datasets, where mask will underfill (may be due to 2d vs. 3d, see discussion notes w/ OB)
  • Separate masking step adds complication to workflow

Other tasks:

  • move masking to filter library.
  • fix test w/ helix-DWI.
  • add test(s) w/ real data.
  • re-incorporate masking pipeline into tensor estimation as library call
  • make CLI a bare wrapper.

module naming and organization

The organization of SlicerDMRI modules in the menu is unclear and confusing. The user does not understand the abstract logic of organization by input data type. Organization by order of module use would make more sense, with some main modules under Diffusion and others subcategorized.

Also, many module names are also unclear. Tract would be better than fiber bundle, for example. Possible changes:

Module name Suggested improved name

DWIToDTIEstimation DiffusionTensorEstimation
DiffusionTensorScalarMeasurements DiffusionTensorMeasurements
DiffusionWeightedVolumeMasking DiffusionBrainMask
FiberBundleLabelSelect TractSelect
FiberTractMeasurements TractMeasurements
TractographyLabelMapSeeding TractSeeding
TractographyDisplay TractDisplay
TractographyInteractiveSeeding TractInteractiveSeeding
DICOM2FullBrainTractography TractWorkflow ?
FiberBundleToLabelMap TractToLabelMap
FiberEndPointFromLabelMap TractEndPointAnalysis
FiberTractClean TractFilter or TractClean

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.