Giter Club home page Giter Club logo

spm-hospital-preproc's People

Contributors

balbasty avatar brudfors avatar marksgraham avatar pwrightkcl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spm-hospital-preproc's Issues

reslice_images and missing affine matrices!

Hey Mikael,

I am using spm-hospital-preproc to register clinical MRIs (registered well-over 110K sessions recently and can confirm it is working beautifully). I would now like to keep the final affine transformation matrices for each input image once the pipeline is finished, i.e. the M cell in RunPreproc.m. The problem is that I am reslicing, so I get to line 208 of RunPreproc and it runs reslice_images.m, which on lines 31-34 replaces all the affine matrices with the one corresponding to the first image (the ref_ix image):

% Update M
for n=source_ix
M{n} = M{ref_ix};
end

Up until this point, as far as I can tell, the ith element of M is the composition of all the affine transformations applied to input image i thus far, which is what I want! Have I missed something? It would be really nice if I could affine register + reslice but still get the overall transformation matrix for each image.

Thanks loads for the amazing software!

bfcorr gives "Index exceeds the number of array elements." error

Running a pipeline with two images, including segmentation and bias field correction, the bias field correction step crashes with "Index exceeds the number of array elements.". It is looking for a bias-corrected image for each of the segmentation inputs, but there is only one in line 7:
Nii{1}(n) = nifti(pth_seg{7}{n});

Inputs to bf_correct.m:
Nii - 1x1 cell array
Nii{1} - 1x2 nifti
pth_seg - 1x8 cell array
pth_seg{5:7} - 1x1 cell arrays
pth_seg{[1:4,8]} - empty (0x0 double)
pth_seg{7} - 1x1 cell array, with a bias corrected image filename corresponding to the first input image

It looks like the internal SPM function only writes bias corrected for one image. It seems like a decision is needed about whether to limit the user to one bias-corrected image (which may break later steps), or save the bias field and apply it to each image after SPM has finished.

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.