Giter VIP home page Giter VIP logo

dhcp-structural-pipeline's People

Contributors

amakropoulos avatar jcupitt 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

Watchers

 avatar  avatar  avatar  avatar

dhcp-structural-pipeline's Issues

setup.sh failure

Hello,

When running the setup.sh file on Ubuntu 18.04 I get the following error during the VTK part:

CMake Error at /dhcp-structural-pipeline/build/VTK/CMake/ExternalData.cmake:1005 (message):
Object MD5=58c536bccfe18a4dc4d157f35e821489 not found at:

http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=58c536bccfe18a4dc4d157f35e821489&algorithm=MD5 ("HTTP response code said error")
http://www.vtk.org/files/ExternalData/MD5/58c536bccfe18a4dc4d157f35e821489 ("Transferred a partial file")

Could someone help me with this?

best,
C.

exporting surface files (*.dscalar.nii or *.shape.gii) to freesurfer format

Hi, I would need some help for the interpretation of the curvature and sulcal maps coming out of the pipeline. I would like to convert them to FreeSurfer format (*h.curv, *h.sulc) but I can't seem to make it work as the content size doesn't match the size of the corresponding surfaces.

Thank you,

Andrea

setup.sh Failure

I 'm tryng to set up the dhcp pipeline but i have a configuration
problem about the installation as cited above :
make /usr/src/structural-pipeline -DMIRTK_DIR=/usr/src/structural-pipeline/build/MIRTK/build/lib/cmake/mirtk -DVTK_DIR=/usr/src/structural-pipeline/build/VTK/build -DITK_DIR=/usr/src/structural-pipeline/build/ITK/build -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 -DCMAKE_C_COMPILER=/usr/bin/gcc-5 : command failed, see log file: /usr/src/structural-pipeline/setup.log

could you help me ?

Thank you in Advance

Labels for ROI's

Is there a handy look up table for all of the "87" labels used in the segmentation of ROI's?

In the atlas folder I can only find the table for 9 tissue types (CSF, white, grey, etc.)

Thanks!

docker issue apple silicon chips?

Hi,

I’m trying to run the docker version of the pipeline on a mac and it seems to go well until the dof folder starts get filled (don’t know which exact step this is).

The pipeline’s been running on the same subject for 5 days now. I dedicated 24gb RAM to docker to work and around 80gb of disk space. I see a message/warning on the docker app with regard the pipeline been built to work on AMD chips, could this be the issue? I’m working on a macbook pro (m1 pro, apple silicon). Thanks!

Best,
J

SurfaceRecon - removing_intersections - Exception: Failed to resolve self-intersections

After looking in the workdir, it appears the file t2w-image.nii.gz is not the same as the original T2 which was used as input to the pipeline.
image

Original Image:
Image Dimensions (Y, Z, X): 160 x 160 x 120
Series Length: 1
Voxel Dimensions (Y, Z, X): 1 x 1 x 1 Millimeters
Size of Series Point: 3 Seconds
Byte Type: 4-Byte Float
Byte Order: Little Endian
Compression: GZIP
Data Orientation: Columns (Y-), Rows (Z-), Slices (X+)

Transformed t2w_image.nii.gz:
Image Dimensions (X, Y, Z): 96 x 114 x 99
Series Length: 1
Voxel Dimensions (X, Y, Z): 1 x 1 x 1 Millimeters
Size of Series Point: 1 Milliseconds
Byte Type: 4-Byte Float
Byte Order: Little Endian
Compression: GZIP
Data Orientation: Data order not specified.

I believe this is the step where this happens in recon-neonatal-cortex.py
neoctx.makedirs(t2w_image)
neoctx.run(
'transform-image',
args=[
input_t2w_image,
t2w_image
],
opts={
'interp': 'fast cubic bspline with padding',
'Sp': 0,
'dofin': 'Id',
'target': brain_mask,
'type': 'float'
}
)

recon-neonatal-cortex error

Hello,

I am trying to run the pipeline on infants from the Baby Connectome Project. Most, but not all participants receive an error during surface analysis. I have copied the surface.err file below as well as attaching the surface.log file.

Surface.err:
ERROR: In /usr/src/structural-pipeline/build/VTK/Filters/Core/vtkPolyDataConnectivityFilter.cxx, line 106
vtkPolyDataConnectivityFilter (0x1d7c160): No points!

ERROR: In /usr/src/structural-pipeline/build/VTK/Filters/Core/vtkPolyDataConnectivityFilter.cxx, line 106
vtkPolyDataConnectivityFilter (0x1da2910): No points!

Error: Could not find a closed intersection with finite cutting plane near segmentation boundary!
Traceback (most recent call last):
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/tools/recon-neonatal-cortex", line 938, in
check=args.check)
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/tools/recon-neonatal-cortex", line 587, in recon_neonatal_cortex
temp=temp_dir, check=check)
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/python/mirtk/deformable/neonatal_cortex.py", line 1201, in join_cortical_surfaces
'smoothing-iterations': 100, 'smoothing-lambda': 1})
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/python/mirtk/deformable/neonatal_cortex.py", line 183, in run
_run(tool, args=args, opts=opts, verbose=showcmd, threads=threads)
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/python/mirtk/subprocess.py", line 162, in run
check_call(argv, verbose=verbose)
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/python/mirtk/subprocess.py", line 124, in check_call
_call(argv, verbose=verbose, execfunc=subprocess.check_call)
File "/usr/src/structural-pipeline/build/MIRTK/build/lib/python/mirtk/subprocess.py", line 114, in _call
return execfunc(argv)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '[u'/usr/src/structural-pipeline/build/MIRTK/build/lib/tools/merge-surfaces', '-smoothing-iterations', '100', '-source-array', 'RegionId', '-largest', 'True', '-smoothing-lambda', '1', '-output', '/imaging/opendata/HCP-BCP/analyses/infant_preprocessed/test_pipeline/workdir/sub-116056-ses-3mo/surfaces/sub-116056-ses-3mo/vtk/temp-recon/sub-116056-ses-3mo/cerebrum-1.vtp', '-snap-tolerance', '0.1', '-input', 'surfaces/sub-116056-ses-3mo/vtk/temp-recon/sub-116056-ses-3mo/cerebrum-rh.vtp', 'surfaces/sub-116056-ses-3mo/vtk/temp-recon/sub-116056-ses-3mo/cerebrum-lh.vtp', '-dividers', 'True', '-labels', 'surfaces/sub-116056-ses-3mo/vtk/temp-recon/sub-116056-ses-3mo/region-labels.nii.gz', '-tolerance', '1']' returned non-zero exit status 1
Error: recon-neonatal-cortex command returned non-zero exit status 1

The folder: '/surfaces/sub-116056-ses-3mo/vtk/' is empty besides the 'temp-recon' subfolder. The 'temp-recon' folder includes the files: cerebrum-lh.vtp, cerebrum-rh.vtp, and t2w-image.nii.gz. The command for surfaces appears to be also looking for 'region-labels.nii.gx', and 'cerebrum-1.vtp' that are not present in the folder. I am confused about why this is happening as I've confirmed that participants who have successfully made it through the pipeline have the same amount and type of input data as participants that have had this error.

Thanks in advance!

Best,
Lexi

sub-116056-ses-3mo.surface.log

Calculate curvature in the script process-surfaces-hemisphere

Hi
I was trying to run the dhcp-structural-pipeline, and I noticed the command in process-surfaces-hemisphere:
run mirtk calculate $outvtk/$hs.curvature.vtk -mul -1 -scalars Curvature -out $outvtk/$hs.curvature.vtk
Why was the curvature multiplied by -1 ?
If i want to calculate k1, k2, gaussian curvature and curvedness, do i need to multiple these indices by -1 ?

Thank you,
ruoke

Pipeline outputs

Dear all,
I just downloaded the dHCP pipeline from docker. I noticed the output format for the surface reconstruction files is Gifti.
I am used to vtk files. Do you know if there is a way to convert a Gifti file to vtk? Otherwise, which software would you advice for visualizing Gifti files ?
Thanks in advance,
Fleur

Unable to factor linear system

subject1-session1.surface.log
subject1-session1.surface.err.txt

I am running the dHCP via docker.

Post-segmentation, the surface reconstruction stage runs into the error:

Generic Warning: In /usr/local/dhcp/1.1.0-a/build/VTK/Common/Core/vtkMath.cxx, line 548
Unable to factor linear system

Error: Could not find a closed intersection with finite cutting plane near segmentation boundary!
Traceback (most recent call last):
  File "/usr/local/dhcp/1.1.0-a/build/MIRTK/build/lib/tools/recon-neonatal-cortex", line 938, in <module>
    check=args.check)
.
.
.
Error: recon-neonatal-cortex command returned non-zero exit status 1

I have attached the log and error files for the segmentation.

I am unsure of how to proceed on this issue.

subject1-session1.surface.log

Surface Reconstruction FAILED, please suggest new parameter values for gaus_curvature and min_width

I have had several subjects complete the segmentation pipeline but subsequently fail the surface reconstruction. About half of these can be successfully reconstructed after re-running the surface reconstruction with a different gaus_curve parameter, changed from 0 to .5

Can anyone recommend ranges of values to try for gaus_curve and min_width? The other half may simply be un-reconstructable, as I've also tried gaus_curv equal to and above 1, with no luck.

Any information on how these parameters should be manipulated would be much appreciated. Thank you.

mirtk padding failure for tissue labels

Error messages from the .log and .err respectively:

mirtk padding segmentations/{99988811}.nii-session1_tissue_labels.nii.gz segment
ations/{99988811}.nii-session1_tissue_labels.nii.gz masks/{99988811}.nii-session
1-labels.nii.gz 2 1 4 0 : failed

IOError: Cifst
ream::Open: Failed to open file segmentations/{99988811}.nii-session1_tissue_lab
els.nii.gz
Error: padding command returned non-zero exit status 1

I have verified that the tissue_labels file exists and has the right labels...
The padding sub-routine works fine until this step.
Does anyone know how to debug this or has experienced this before?

Error with dhcp-structural-pipeline:fetal in docker

Hi,
I was trying to use the dhcp-structural-pipeline:fetal (in docker) to segment fetal brain. I ran the command as follows:
xuxinyi@DESKTOP-LFK9GOB:/mnt/c/Users/lenovoM425/Desktop/segment-fetal$ docker run dhcp-segmentation-pipeline:fetal 25w1wpp.nii.gz 25 25w1wpp.nii.gz does not exist! xuxinyi@DESKTOP-LFK9GOB:/mnt/c/Users/lenovoM425/Desktop/segment-fetal$ docker run dhcp-segmentation-pipeline:fetal $PWD/25w1wpp.nii.gz 25 /mnt/c/Users/lenovoM425/Desktop/segment-fetal/25w1wpp.nii.gz does not exist! xuxinyi@DESKTOP-LFK9GOB:/mnt/c/Users/lenovoM425/Desktop/segment-fetal$ docker run -v $PWD/data:/data dhcp-segmentation-p ipeline:fetal data/25w1wpp.nii.gz 25 data/25w1wpp.nii.gz does not exist!

25w1wpp.nii.gz is both in the $PWD and the $PWD/data, however each way gets the error "file does not exist!".
Please help! Thanks!

image
image
image

Surface error under docker image

Hi,

I was trying to use the pipeline script on images of 40 weeks old and got this error:

xxx@host:~$ docker run --rm -t -u $(id -u):$(id -g) -v $PWD/data:/data biomedia/dhcp-structural-pipeline:latest subject1 session1 40 -T1 data/sub-CC00060XX03_ses-12501_T1w.nii.gz -T2 data/sub-CC00060XX03_ses-12501_T2w.nii.gz -t 8
dHCP pipeline v1.1
Subject:     subject1
Session:     session1 
Age:         40
T1:          sub-CC00060XX03_ses-12501_T1w.nii.gz
T2:          sub-CC00060XX03_ses-12501_T2w.nii.gz
Directory:   /data 
Threads:     8
Minimal:     1
Warning: Number of threads>1: This may result in minor reproducibility differences


/usr/src/structural-pipeline/dhcp-pipeline.sh subject1 session1 40 -T1 data/sub-CC00060XX03_ses-12501_T1w.nii.gz -T2 data/sub-CC00060XX03_ses-12501_T2w.nii.gz -t 8
----------------------------
running segmentation pipeline
/usr/src/structural-pipeline/scripts/segmentation/pipeline.sh /data/workdir/subject1-session1/T2/subject1-session1.nii.gz subject1-session1 40 -d /data/workdir/subject1-session1 -t 8
-----------------------
running additional pipeline
/usr/src/structural-pipeline/scripts/misc/pipeline.sh subject1-session1 40 -d /data/workdir/subject1-session1 -t 8
-----------------------
running surface pipeline
/usr/src/structural-pipeline/scripts/surface/pipeline.sh subject1-session1 -d /data/workdir/subject1-session1 -t 8
Pipeline failed: see log files /data/logs/subject1-session1.surface.log /data/logs/subject1-session1.surface.err for details

In the log directory, I found 6 log files:

xxx@host:~/data/logs$ ls
subject1-session1.additional.err    subject1-session1.segmentation.log
subject1-session1.additional.log    subject1-session1.surface.err
subject1-session1.segmentation.err  subject1-session1.surface.log

the subject1-session1.surface.log file ends with this line failed: see log files logs/subject1-session1.surface.R-hemisphere.log , logs/subject1-session1.surface.R-hemisphere.err for details
there's no subject1-session1.surface.R-hemisphere.err in the logs directory.

I've attached a zipped logs directory to this issue.
logs.zip

Please help, thanks.

Error with T1w/T2w maps

Hi,

When I created the T1w/T2w maps. I found an error and I had to replace the header of the registered T1w by the one of the T2w to create the map. I found that the issue was related to the *_T1w2anat-r.dof.gz and *_T1w2anat.mat transformation files. Assuming that both are the same (just converted from one format to another), when I apply the two files to the T1w, the resulting file using the _T1w2anat-r.dof.gz has a small difference in the header (around 110^-10), this difference is small enough to be ignored by FSL (I can overlay the maps correctly with fslview) but it's detected as a difference by the connectome workbench to create the T1w/T2w maps.

As I said, as a workaround just copying the header from the other image worked.

Best regards,

Manuel

Infant structural T1 data segmentation

Hi,
I would like to run developing HCP pipeline to perform segmentation of neonatal T1 scans. I know it surely works on T2 data , I would like to know if it is suitable to segment T1, too. Indeed, it is the only structural kind of scan I have,
Best
Rosella

Native install on Big Sur

Hi,

I would really like to get the pipeline running natively. I am on Big Sur 11.2.3. The install is crashing building VTK. I am attaching the log. Thanks for any ideas!

Best,
Alex
setup.log

Segmentation error

Hi all,

Thank you for sharing this pipeline. I am trying to run it on my neonate data (infants scanned within 3 months of birth). I formatted my data to match the suggested command to run it in docker. I am running it on Windows 10 but I also got the same error on my mac (Sierra). I have attached the log. Thank you for your help!
Best,
Alex
subject1-session1.segmentation.log

Tissue probability maps are not correctly copied

Hi,

When I run the pipeline (locally) with the -additional flag the obtained tissue probability maps for the gm, csf and wm are the same, all of them are the gm tpm. It looks like a mistake copying the files.

Best regards,

Manuel

Non rigid step failing

Hi all,

Thanks for sharing the pipeline. I am using the most recent docker version on a mac and it is failing at this step: usr/src/structural-pipeline/build/MIRTK/Packages/DrawEM/scripts/tissue-priors.sh T2w 40 non-rigid-v2 1 : failed
/usr/src/structural-pipeline/build/MIRTK/Packages/DrawEM/pipelines/neonatal-pipeline.sh /data/T2w.nii.gz 40 -t 1 -c 1 -p 1 -v 1 -atlas non-rigid-v2 : failed

Attached are the error logs. Thanks for your help1

T2w-tissue-em copy.txt
T2w-tissue-em-err copy.txt

Installation difficulties

Dear developers,

We are having difficulties installing the package on our Linux server.

More specifically, we are running into compilation issues with VTK, where it seems downloads/tests during the VTK “make” are not working properly and it dies at around 40% complete (VTK cmake runs fine, btw). So far, workbench and ITK compile just fine. We have previously installed DRAWEM on its own, and VTK compiled fine…So we suspect that there is something wrong with this dhcp version and VTK.

Unfortunately, we cannot use docker on our cluster. Would it be possible to create a singularity image for us?

PS: I have also opened a topic on neurostars as well (https://neurostars.org/t/developing-hcp-structural-pipeline-installation/19796) about this.

Many thanks in advance!

label volumes have non-integer values

The outputs called "drawem_all_labels" and "draweme_tissue_labels" are segmentation volumes with index labels as values indicating which voxel is which region. However, there are non-integer values around the borders with other regions. Should we simply round these values to the nearest integer?

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.