Activity for Philip Cook

  • Philip Cook Philip Cook committed [8d6e78] on Code

    DOC: Remove outdated comment about sparse sampling

  • Philip Cook Philip Cook modified a comment on discussion Help

    How to get help with ANTs ANTs wiki: https://github.com/ANTsX/ANTs/wiki Search issues or open a new one: https://github.com/ANTsX/ANTs/issues Please use the issue templates to ensure that you provide us with the information we need to help.

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    How to get help with ANTs ANTs wiki: https://github.com/ANTsX/ANTs/wiki Search issues or open a new one: https://github.com/ANTsX/ANTs/issues Please use the issue templates to ensure that you provide us with the information we need to help.

  • Philip Cook Philip Cook posted a comment on discussion Help

    How to get help with ANTs ANTs wiki: https://github.com/ANTsX/ANTs/wiki Search issues or open a new one https://github.com/ANTsX/ANTs/issues Please use the issue templates to ensure that you provide us with the information we need to help.

  • Philip Cook Philip Cook posted a comment on discussion Help

    I have trouble getting Sourceforge emails consistently. We could set preferred support to Github rather than this forum?

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    Thanks guys. So that's one thing to consider with big slices and the CC metric.

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    Question for @ntustison - how does the metric radius handle anisotropic voxels? I know the shrink factors use the smallest of the three dimensions. Does CC[fixed, moving, 1, 4] work the same way? I kind of think it would have to, but I've not checked the code.

  • Philip Cook Philip Cook modified a comment on discussion Open Discussion

    Here's a script I have used with some success. Nothing's as good as a field map, but this is what I use when that's not an option https://github.com/ftdc-picsl/dtProcessing/blob/master/preproc/distCorrDiffToStructural.pl It's pretty customized to work with in-house data, but could be a starting point. It uses a Rigid stage then BSplineSyN. I avoid affine as I find there is little true affine distortion between the DWI and T1, and it just makes the solution worse. For anisotropic voxels, you might...

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    Here's a script I have used with some success. Nothing's as good as a field map, but this is what I use when that's not an option https://github.com/ftdc-picsl/dtProcessing/blob/master/preproc/distCorrDiffToStructural.pl It's pretty customized to work with in-house data, but could be a starting point. It uses a Rigid stage then BSplineSyN. I avoid affine as I find there is little true affine distortion between the DWI and T1, and it just makes the solution worse. For anisotropic voxels, you might...

  • Philip Cook Philip Cook posted a comment on discussion Help

    It sounds like the template is not being updated, which suggests a problem with the pairwise registration to the initial template. The output files from those jobs might hold some clues.

  • Philip Cook Philip Cook posted a comment on discussion Help

    I think you need to request more memory to run the job. Most HPC environments limit the memory available by default, and this can cause programs to exit with status 137. Your local system administrators should be able to tell you how to get more RAM when you submit the job.

  • Philip Cook Philip Cook modified a comment on discussion Help

    It might be memory. You can control threads by setting the variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 If this variable is not defined, ANTs will try to use as many threads as there are available cores. So setting this to 1 or 2 will use fewer threads on most machines. You can also run antsCorticalThickness.sh with -j 1 to use single precision floats, which will reduce memory footprint.

  • Philip Cook Philip Cook posted a comment on discussion Help

    It might be memory, you can control by setting the variable ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 If this variable is not defined, ANTs will try to use as many threads as there are available cores. So setting this to 1 or 2 will use fewer threads on most machines. You can also run antsCorticalThickness.sh with -j 1 to use single precision floats, which will reduce memory footprint.

  • Philip Cook Philip Cook modified a comment on discussion Help

    In addition to the above, this page may also be helpful

  • Philip Cook Philip Cook posted a comment on discussion Help

    In addition to the above, this page may also be helpful https://github.com/ANTsX/ANTs/wiki/Forward-and-inverse-warps-for-warping-images,-pointsets-and-Jacobians

  • Philip Cook Philip Cook posted a comment on discussion Help

    If the file /Users/lawlesrd/antsbin/bin/antsRegistration does not exist, then nothing is going to work. Please try installing again, there is a guide with links to a runnable script here https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS

  • Philip Cook Philip Cook posted a comment on discussion Help

    ANTSPATH needs a trailing slash. You should be able to run ${ANTSPATH}antsRegistration

  • Philip Cook Philip Cook committed [4194e9]

    ENH: Check quaternion validity and correct for precision errors

  • Philip Cook Philip Cook committed [8787dd]

    Test output including new conmat functionality

  • Philip Cook Philip Cook committed [d3b8d9]

    ENH: Allow SD as a tract stat

  • Philip Cook Philip Cook committed [1e57b0]

    ENH: Allow conmat to count longest paths.

  • Philip Cook Philip Cook committed [1c4ef7]

    Tests for longest path endpoints

  • Philip Cook Philip Cook committed [b04ae0]

    BUG: bitpix set incorrectly for RGB images, doesn't bother ITK but fixing anyway

  • Philip Cook Philip Cook committed [37ef03]

    Somehow lost the code that allowed headers in conmat label definitions. Re-adding it

  • Philip Cook Philip Cook committed [e2b21c]

    Adding an option to conmat to output the graph nodes

  • Philip Cook Philip Cook committed [87b101]

    Allow -unweightedb in estimatesnr

  • Philip Cook Philip Cook committed [6bb25a]

    Make -bscale 1 the default, which is what most DTI users will want

  • Philip Cook Philip Cook committed [a84400]

    ENH: eig2nii converts dteig output to nii

  • Philip Cook Philip Cook committed [af55b0]

    ENH: Allow non-zero unweighted measurements for dtspd

  • Philip Cook Philip Cook posted a comment on discussion Help

    It is probably caused by a failure to allocate memory. Segmentation faults happen when a pointer references memory that it's not allowed to use by the OS. Bus errors happen when a pointer references memory that can't be a valid pointer. Just because a system has a large amount of RAM doesn't mean it will allow any process to use all or even most of it. You have to be sure that your system will allow antsRegistration to allocate enough memory for the process.

  • Philip Cook Philip Cook posted a comment on discussion Help

    There is randomness to the sampling even in the "regular" strategy. There is a small perturbation of the points, designed to reduce aliasing. This goes back a long time: https://github.com/InsightSoftwareConsortium/ITK/blob/f25526e6a430590ed2b0e78110d470da5d441e46/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx#L954-L983 Multi-threading is also known to produce differences in results, so changing the number of threads will also change output. Can you produce identical...

  • Philip Cook Philip Cook posted a comment on discussion Help

    Set "USE_SYSTEM_ITK" in CMake. Be aware that ANTs updates its minimum required ITK rather frequently, so to maximize the chances of this working, I recommend basing your changes off the ITK commit that ANTs uses in the Superbuild.

  • Philip Cook Philip Cook posted a comment on discussion Help

    ANTSPATH needs to be defined such that ${ANTSPATH}antsRegistration exists. Then you can export PATH=${ANTSPATH}:${PATH} and run the executables and scripts.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Sorry, that old thread has wrong information. ANTSPATH must end with a slash. The Github wiki has current installation instructions.

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    Writing interval volumes definitely works - but it writes them to a fixed file name from where the program is called. Something like "stage0_iter0.nii.gz".

  • Philip Cook Philip Cook posted a comment on discussion Help

    You can call ANTsR code from a script via Rscript. This is the best way to keep the processing consistent. Alternatively, you can use a general image calculator like c3d, which uses ITK I/O. This is important to maintain compatibility within an ANTs pipeline.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Try TimeSeriesAssemble in ImageMath to stack a 3D into a 4D volume.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Try running ulimit -a to see the resource limits on your system. There will be an entry for cpu time. If this limit is exceeded by any process, it gets killed and that notification is generated.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Can you share the full command please?

  • Philip Cook Philip Cook posted a comment on discussion Help

    I think those are log values.

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    In humans, I've used Rigid alignment followed by BSplineSyN, using the T1 and the B0 from the DTI. I'd do rigid first just to see if you can get a good initialization, and how much nonlinear distortion you are dealing with.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Hmm. There might be a problem with the multiple periods in your file names. It seems to be looking for a different affine file than is being produced. In a clean directory, try replacing the periods in the file names (not in the .nii.gz extension) with underscores, and see if it runs.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Can you check with ls that all these files exist? /l/Downloads/LPBA40subjects.native_space_radio/LPBA40/test/rigid0_0_S01Affine.txt /l/Downloads/LPBA40subjects.native_space_radio/LPBA40/test/S01.native_radio.mri.nii.gz /l/Downloads/LPBA40subjects.native_space_radio/LPBA40/test/MyFastertemplate0.nii.gz /l/Downloads/LPBA40subjects.native_space_radio/LPBA40/test/rigid0_0_S01Affine.txt

  • Philip Cook Philip Cook modified a comment on discussion Help

    buildtemplateparallel.sh is no longer maintained, so antsMultivariateTemplateConstruction.sh is the thing to use. I suspect you have the same error in both, which is that there's not enough RAM available to complete the registration and warping of the input images. That's the usual cause of missing output. You can also look for clues in ./job*_metriclog.txt and try running the individual steps in ./job_00_r.sh etc. Since you are running 5 jobs in parallel, one job might work. In which case running...

  • Philip Cook Philip Cook posted a comment on discussion Help

    buildtemplateparallel.sh is no longer maintained, so antsMultivariateTemplateConstruction.sh is the thing to use. I suspect you have the same error in both, which is that there's not enough RAM available to complete the registration and warping of the input images. That's the usual cause of missing output.

  • Philip Cook Philip Cook posted a comment on discussion Help

    ANTs does not have a tensor metric, but you can use any scalar image. The script requires that the different modalities be aligned simultaneously for each subject. In other words, your T1 and T2 from the same subject should be aligned before building the template. Depending on the sequences, there may be nonlinear distortions between each modality that are quite difficult to resolve. With diffusion images, the distortions can be locally quite large. These would need ot be corrected before building...

  • Philip Cook Philip Cook posted a comment on discussion Help

    This thread might be helpful. https://github.com/stnava/ANTs/issues/385 Also this paper https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3870320/ To get help with your specific problem, post the full commands you tried, and better yet also a link to the data.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Thanks. I ran the command successfully antsRegistration --dimensionality 3 --float 0 --interpolation BSpline[3] --use-histogram-matching 1 --initial-moving-transform [PrePET_50.nrrd,PostPET_50.nrrd,1] --transform Rigid[0.1] --metric MI[PrePET_50.nrrd,PostPET_50.nrrd,1,32,Regular,0.25] --convergence [1000x500x250x0,1e-6,10] --shrink-factors 8x4x2x1 --smoothing-sigmas 3x2x1x0vox --transform SyN[0.1,3,0] --metric MeanSquares[PrePET_50.nrrd,PostPET_50.nrrd,1,16,Regular,0.25] --convergence [50x0,1e-6,10]...

  • Philip Cook Philip Cook committed [e3171d]

    Updating doc

  • Philip Cook Philip Cook posted a comment on discussion Help

    Your command is missing the -o / --output option. In the current ANTs, this will refuse to run before it could encounter any error with the initial moving transform. I can investigate further if you can share data and provide the exact command that was run. I'm puzzled by the use of ./antsRegistration, which suggests your data and your ANTs executables are in the same directory. Better to add ANTs (the directory containing executables and ANTs scripts) to the PATH variable, and store the data elsewhere...

  • Philip Cook Philip Cook committed [3d42fe]

    Document cone of uncertainty output for orientbiasmap

  • Philip Cook Philip Cook posted a comment on discussion Help

    If /filepath/mpr_brain/ exists, and the file cannot be written, check your disk quota. Padding the images will require more storage space on disk and also more RAM for the registration jobs.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Problems like this need a good initialization. You can open both images in separate ITK-SNAP windows and click in different places in the moving image, the crosshairs will show the corresponding place in the fixed image. There should be a reasonably good correspondence if the image headers are set correctly. If not, you're going to need an inital transform to supply to -r in antsRegistration. Once you have solved initialization, I'd recommend not doing large shrink factors as it will reduce your...

  • Philip Cook Philip Cook committed [892293]

    Standardize residuals

  • Philip Cook Philip Cook committed [68464b]

    Increase I/O buffering

  • Philip Cook Philip Cook posted a comment on discussion Help

    Some notes on matching parameters from ANTS and antsRegistration here https://github.com/stnava/ANTs/wiki/ANTS-and-antsRegistration

  • Philip Cook Philip Cook committed [60e35d]

    Merge branch 'master' of ssh://git.code.sf.net/p/camino/code into dtiQC

  • Philip Cook Philip Cook committed [3b644b]

    WIP on dtspd command. Also did some I/O speed tinkering

  • Philip Cook Philip Cook committed [68b018]

    dtspd command implemented

  • Philip Cook Philip Cook committed [f71354]

    Output additional stuff from orientbiasmap

  • Philip Cook Philip Cook committed [613237]

    Almost complete first pass

  • Philip Cook Philip Cook committed [0b3002]

    Merge remote-tracking branch 'origin/master' into dtiQC

  • Philip Cook Philip Cook posted a comment on discussion Help

    The rigid component of the average transform is not applied to the template. The deformable part is, so there could still be some drift, but it should be much less. To avoid bias, I try not to use -y unless it's causing serious problems. The final template can be resampled after the fact.

  • Philip Cook Philip Cook posted a comment on discussion Help

    When you use -z, that image is used as the initial template. It's not incorporated into subsequent iterations, unless it is also specified as one of the input images. After each iteration, the template is updated to move it closer to the population mean. This can involve translation and rotations as well, unless you disable that with -y. Say you pick an initial template from a subject with the head rotated to the left, but most subjects are centered or rotated slightly to the right. Over time the...

  • Philip Cook Philip Cook committed [8dca6e]

    Working on fixing negative eigenvalues and other QC output. Might also try iRESTORE

  • Philip Cook Philip Cook committed [fada9b]

    Update test to deal with new default bscale = 1 for fsl2scheme

  • Philip Cook Philip Cook posted a comment on discussion Help

    Thanks, that is newer than what comes with the Superbuild, by my reading of this https://github.com/stnava/ANTs/blob/4d580c86fb3d7935165660c707fca1bdd7bbc968/SuperBuild/External_ITKv4.cmake So maybe something changed that fixes the problem.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Thanks for the update. Do you happen to know the exact version of ITK you compiled against? Might be helpful if this problem comes up in the future.

  • Philip Cook Philip Cook posted a comment on discussion Help

    Superbuild should work. You can try changing the build mode from Release to Debug, see if that offers any clues. I don't know if it will print anything else to the terminal. The only other thing I can think of is the compiler. There's been reports of different run time behavior between GNU compilers and XCode / clang.

  • Philip Cook Philip Cook posted a comment on discussion Help

    I'm out of ideas at this point. The same command line works for me on today's ANTs (running OS X 10.11) Using double precision for computations. Input scalar image: input_t1.nii.gz Reference image: template.nii.gz ============================================================================= The composite transform comprises the following transforms (in order): 1. temp_2_subj_0GenericAffine.mat (type = AffineTransform) ============================================================================= Default...

  • Philip Cook Philip Cook posted a comment on discussion Help

    Syntax looks correct, suggesting the file is unreadable due to OS issues (file permissions, wrong directory) or because it's corrupted (perhaps by a text editor), or otherwise incompatible with the data. I might be able to say more if you post the actual error message. You can also try antsRegistrationSyNQuick.sh with the -t a option, which outputs the deformed images directly from antsRegistration - you should be able to replicate that output very closely by subsequently calling antsRegistration...

  • Philip Cook Philip Cook posted a comment on discussion Help

    It's a binary file, you can see its contents with antsTransformInfo. It can be read directly into antsApplyTransforms with the -t option.

  • Philip Cook Philip Cook posted a comment on discussion Help

    That's odd. Can you see this in the deformed individual images, or only in the template? You might want to run MeasureMinMaxMean on the input images to verify the intensities as understood by ANTs.

  • Philip Cook Philip Cook posted a comment on discussion Help

    The order shouldn't matter if the images are correctly aligned in physical space. Can you create a minimal example, say using 1 image from each of the sites, and share data?

  • Philip Cook Philip Cook posted a comment on discussion Help

    Maybe the mean intensity drifts because N4 is called with -r 0? https://github.com/stnava/ANTs/blob/master/Scripts/antsMultivariateTemplateConstruction.sh#L1177

  • Philip Cook Philip Cook posted a comment on discussion Help

    The call to SGE qsub includes -cwd, which sets the working directory for the job to be the current directory. Perhaps you can find an equivalent flag for your system.

  • Philip Cook Philip Cook posted a comment on discussion Help

    You are changing the input to antsRegistration at every iteration, and it is then finding a new solution that minimizes MI for the new input. Every time you apply the transforms, you are resampling the previous output and this produces a different input to the next round of registration, so it should keep changing. If you saved the miwarp_ii images, you could compare them to miwarp_1. I would expect that the miwarps would get smoother but not change too much after the first few iterations. It would...

  • Philip Cook Philip Cook modified a comment on discussion Help

    I also know little to nothing about Windows but there might be some helpful info...

  • Philip Cook Philip Cook posted a comment on discussion Help

    I also know little to nothing about Windows but there might be some helpful info...

  • Philip Cook Philip Cook posted a comment on discussion Help

    I usually use ITK-SNAP

  • Philip Cook Philip Cook posted a comment on discussion Help

    The sigma values (standard deviations) of the Gaussian smoothing kernel are passed...

  • Philip Cook Philip Cook posted a comment on discussion Help

    I believe that's correct. You can use the T1 only to get a whole-brain alignment,...

  • Philip Cook Philip Cook committed [1886d5]

    Make -bscale 1 the default for fsl2scheme, as m...

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    This code looks like it will fail because $file is T1_ro_brainRepaired. and not T1_ro_brainRepaired.nii.gz....

  • Philip Cook Philip Cook posted a comment on discussion Help

    It's a bit of a chicken and egg problem as the linear registration is also going...

  • Philip Cook Philip Cook posted a comment on discussion Help

    OK going back to the cropped volumes Fixed.nrrd and Moving.nrrd. Are they cropped...

  • Philip Cook Philip Cook posted a comment on discussion Help

    Whoa, that's a lot of coverage. I was looking at the JPG image, which had the whole...

  • Philip Cook Philip Cook posted a comment on discussion Help

    I saw the link, but aren't those cropped versions?

  • Philip Cook Philip Cook posted a comment on discussion Help

    You won't be able to close such holes because that violates one assumption underpinning...

  • Philip Cook Philip Cook posted a comment on discussion Help

    For example, -t SyN[gradientStep,updateFieldVarianceInVoxelSpace,totalFieldVarianceInVoxelSpace]...

  • Philip Cook Philip Cook posted a comment on discussion Help

    If you want the solution to stay close to the initial solution, I think you would...

  • Philip Cook Philip Cook modified a comment on discussion Open Discussion

    I think you would want to do -t sr. This will do rigid, followed by SyN. The rigid...

  • Philip Cook Philip Cook posted a comment on discussion Open Discussion

    I think you would want to do -s sr. This will do rigid, followed by SyN. The rigid...

  • Philip Cook Philip Cook posted a comment on discussion Help

    Hi, It sounds like you figured this out already, but the number of threads affects...

  • Philip Cook Philip Cook posted a comment on discussion Help

    The WM image has a NIFTI datatype of 32. This is for complex data. The imaginary...

  • Philip Cook Philip Cook modified a comment on discussion Help

    OK I looked at this more carefully. The exact details of the downsampling / smoothing...

  • Philip Cook Philip Cook modified a comment on discussion Help

    The images are downsampled by some integer factor at each level to make the registration...

  • Philip Cook Philip Cook posted a comment on discussion Help

    OK I looked at this more carefully. The exact details of the downsampling / smoothing...

1 >