Cerebrum Labelling with custom atlas and label files

Viewing 1 reply thread
  • Author
    Posts
    • #120
      David Shattuck
      Keymaster

        Hi Rachel –

        There are a few other flags that need to be set to run cerebro. If you look at the cortical extraction script distributed with BrainSuite, which is probably located at /Applications/BrainSuite15b/bin/cortical_extraction.sh on your machine, there is a line for cerebro:

        ${BrainSuiteBin}cerebro $VERBOSE $ATLASES -i ${basename}.bfc.$EXT \
        -l ${basename}.hemi.label.$EXT -m ${basename}.mask.$EXT -o ${basename}.cerebrum.mask.$EXT \
        -c 2 –air ${basename}.air –warp ${basename}.warp ${CEREBROOPTIONS}

        Replacing these with the arguments from your command and ignoring some empty variables yields:

        cerebro –atlas ${workingdir}/inia19-t1-brain_16bit.img –atlaslabels ${workingdir}/inia-struct.img \
        -i e3834_OxM130_AP.nii -o ${workingdir}/e3834_OxM130_AP.cerebrum.mask.nii.gz \
        -l ${basename}.hemi.label.$EXT -m ${basename}.mask.$EXT \
        -c 2 –air ${basename}.air –warp ${basename}.warp

        The -c 2 flag is the one that should fix your issue (it controls the cost function used by AIR during the linear registration step).

        You will need the other flags to complete the cortical extraction and SVReg labeling process.-l and -m save the hemisphere labels and cerebrum mask, which are used later for hemisphere splitting and pial surface expansion. The .air and .warp files save the transformation files and are used to initialize parts of the SVReg registration.

        You could also edit the cortical extraction script to change the atlas files. These lines (38-40) are where it is specified.

        ATLAS=”${BrainSuiteDir}/atlas/brainsuite.icbm452.lpi.v08a.img”
        ATLASLABELS=”${BrainSuiteDir}/atlas/brainsuite.icbm452.v15a.label.img”
        ATLASES=”–atlas ${ATLAS} –atlaslabels ${ATLASLABELS}”

        Let us know if this solves your issue.

        thanks,
        David

      • #121
        Rachel
        Participant

          Hi David, thanks for your reply.

          I did as you said above and am now having this problem (also tried -c 3 and got the same result):

          % cerebro -i e3834_OxM130_AP.nii –atlas /Applications/BrainSuite15b/atlas/inia19-t1-brain_16bit.img –atlaslabels /Applications/BrainSuite15b/atlas/inia19-struct.img -o e3834_OxM130_AP.cerebrum.mask.nii.gz -l e3834_OxM130_AP.hem.label.nii.gz -m e3834_OxM130_AP.mask.nii.gz -c 2 –air e3834_OxM130_AP.air –warp e3834_OxM130_AP.warp

          Initializing brain volume
          Performing linear alignment of atlas brain to subject brain
          Performing warp alignment (order=5) of atlas brain to subject brain
          alignwarp.c: 262: WARNING: Registration terminated due to a Hessian matrix that was not positive definite
          Inspection of results is advised
          alignwarp.c: 262: WARNING: Registration terminated due to a Hessian matrix that was not positive definite
          Inspection of results is advised
          Labeling brain regions
          open_header.c: 232: cannot read 32 bit/pixel data from file /Applications/BrainSuite15b/atlas/inia19-struct.hdr
          The image header indicates an unsupported number of bits per pixel. (AIR_INFO_BITS_ERROR)
          reslice process failed.
          error labeling lobes
          unable to finish making label output.

          The AIR documentation says:
          “If you are having frequent problems with an error indicating the Hessian matrix is not positive definite, try using the -q option. The non-positive definite Hessian matrix is especially likely to arise when you try to register a file to a resliced version of itself (as people often do when they first try out the algorithm). In this particular situation, the problem is created by the fact that the two files only differ by interpolation and round-off errors which do not have well behaved second derivatives.”

          What would you suggest? Is there a way perhaps to include this -q option from AIR?

          Thanks for your help!

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.