Coder Social home page Coder Social logo

petmr-resolute's Introduction

petmr-RESOLUTE

Build Status Codacy Badge DOI

Implementation of the RESOLUTE pseudo-CT (pCT) method for the Siemens mMR.

If you use the RESOLUTE pCT approach in your work, please cite the following paper:

  • Region specific optimization of continuous linear attenuation coefficients based on UTE (RESOLUTE): application to PET/MR brain imaging. Ladefoged, C. N., Benoit, D., Law, I., Holm, S., Kjaer, A., Hojgaard, L., … Andersen, F. L. (2015). Physics in Medicine and Biology, 60(20), 8047–8065. DOI

Required packages

  • ANTs
  • ITK (Note. this can be built when compiling ANTs)
  • Boost
  • glog
  • DCMTK. The application dcmodify must be available on your path.

Template and mask images

The images that are required to run this application are available on Zenodo: DOI

Please extract the zip and amend the JSON file as described below.

Basic usage

./resolute -i <DICOMDIR> -j <JSON>

where <DICOMDIR> contains both the UTE and MRAC DICOM data for a given patient and <JSON> is the JSON configuration file. The application will produce a folder in the output directory specified in the JSON file. The output folder is named using the Study UID, and inside this folder will be a new DICOM series comprising the RESOLUTE MRAC image.

Configuration file

A skeleton JSON file can be created with the command:

./resolute --create-json <MYJSONFILE>

where <MYJSONFILE> is an output filename. The skeleton will look like this:

{
    "MRACSeriesName": "Head_MRAC_PET_UTE_UMAP",
    "UTE1SeriesName": "Head_MRAC_PET_UTE",
    "UTE1TE": "0.07",
    "UTE2SeriesName": "Head_MRAC_PET_UTE",
    "UTE2TE": "2.46",
    "destDir": ".",
    "destExportMethod": "FILE",
    "destFileType": ".nii.gz",
    "logDir": "./logs",
    "regArgs": "3 -m CC[<%%REF%%>,<%%FLOAT%%>,1,4] -i 10x5x2 -o <%%PREFIX%%> -t SyN[0.5] -r Gauss[3,0] -G",
    "regName": "ANTS",
    "regTemplatePath": "",
    "version": "0.0.1"
}

Fill in the desired output directory in the variable destDir, and the path to the registration template manifest.json in regTemplatePath, e.g.

{
    "MRACSeriesName": "Head_MRAC_PET_UTE_UMAP",
    "UTE1SeriesName": "Head_MRAC_PET_UTE",
    "UTE1TE": "0.07",
    "UTE2SeriesName": "Head_MRAC_PET_UTE",
    "UTE2TE": "2.46",
    "destDir": "./OUTPUT",
    "destExportMethod": "FILE",
    "destFileType": ".nii.gz",
    "logDir": "./logs",
    "regName": "ANTS",
    "regTemplatePath": "/path/to/template/manifest.json",
    "regArgs": "3 -m CC[<%%REF%%>,<%%FLOAT%%>,1,4] -i 10x5x2 -o <%%PREFIX%%> -t SyN[0.5] -r Gauss[3,0] -G",
    "version": "0.0.1"
}

petmr-resolute's People

Contributors

bathomas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

lynch829

petmr-resolute's Issues

manifest

Hi

In the RESOLUTE-ATLAS download that I have (downloaded 22 march), the manifest.yaml should have a comma at the end of the "template" line. Otherwise it isn't read properly by resolute.

Thanks

Michael

Installation problems with glog/gflags

Had some problems installing RESOLUTE wrt glog:
[ 25%] Building CXX object src/CMakeFiles/resolute.dir/Resolute.cpp.o
/Users/rich/Documents/Code/RESOLUTE/Source/src/Resolute.cpp:28:10: fatal error: 'glog/logging.h' file not found
#include <glog/logging.h>

Looks like the find_package wasn’t working properly. Here’s all cmake variables relating to glog:

-- glog_CONFIG=/Users/rich/Documents/Code/glog/Install/lib/cmake/glog/glog-config.cmake
-- glog_CONSIDERED_CONFIGS=/Users/rich/Documents/Code/glog/Install/lib/cmake/glog/glog-config.cmake
-- glog_CONSIDERED_VERSIONS=0.4.0
-- glog_DIR=/Users/rich/Documents/Code/glog/Install/lib/cmake/glog
-- glog_FOUND=1
-- glog_VERSION=0.4.0
-- glog_VERSION_COUNT=3
-- glog_VERSION_MAJOR=0
-- glog_VERSION_MINOR=4
-- glog_VERSION_PATCH=0
-- glog_VERSION_TWEAK=0

As a temporary fix, I entered gflags and glog info manually:
include_directories("/Users/rich/Documents/Code/glog/Install/include”) # for glog/logging.h
include_directories("/usr/local/include/“) # for gflags/gflags.h

target_link_libraries(resolute
${ANTS_LIBS}
${ITK_LIBRARIES}
${Boost_LIBRARIES}
# glog <-comment out
"/Users/rich/Documents/Code/glog/Install/lib/libglog.a"
"/usr/local/lib/libgflags.dylib"
nlohmann_json
)

dicom order

Hi

I'm using images from a GE scanner, just to see how it works. The scanner exports dicom Images as individual 2D slices. The resolute program looks to be reading them ok, but the slices seem to be sorted purely by filename.
However, the slice ordering of my dicoms is not consistent ( dicom0001 may be slice 15, dicom0002 is slice 89 etc)

Because the slice ordering of the dicoms is not the same across the two echoes, I got an error message
Description: itk::ERROR: ResoluteImageFilter(0x2beadd0): Inputs do not occupy the same physical space!
I named the files to have consistent filenames according to the slice number, which did then run without displayed errors.

However, I had numbered them as 1 (top of head) to 120 neck, and found that resolute created an upside down image, with resulting terrible spatial normalisation / segmentation.

Having renamed the files again to go from 1 (neck) to 120 top of head, the image is the right way round, and the result does look sensible

I think this non sequential dicom is not unusual, so ideally, the code would be altered to sort the dicom slices according to their z axis location before further processing.

Best wishes

Michael

building

Hello

Thanks for making this code available. I'm probably missing something obvious here, but I'm having no luck with building the code. I'm using ubuntu 16.04

I'm in the petmr-RESOLUTE directory and have done

cmake . 
make 

Two issues so far
a) I get an error

In file included from /usr/include/c++/5/initializer_list:36:0,
                 from /usr/local/include/nlohmann/json.hpp:41,
                 from /mnt/edrive/MJF/resolute/petmr-RESOLUTE/src/Resolute.cpp:29:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \

b) How do I tell it where to look for ITK etc - I'm getting
/petmr-RESOLUTE/src/Resolute.cpp:31:32: fatal error: itkCastImageFilter.h: No such file or directory

Thanks for any advice

Michael

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.