病灶的相关处理

病灶的处理有两种,一种是画出病灶然后投射到MNI152空间。一种是对侧正常翻转到病灶侧,然后预处理。

第一种:
对于T1像,首先使用mri_synthsr (基于深度学习)来校正T1w像,这样会恢复T1到1mm的高精度。
然后将修复后的T1投射到MNI152,使用antsRegisteration。
随后在原始T1w图象上,画出病灶(mricro, mricrogl都可以),然后二值化变成legion mask (fslmaths lesion -bin lesion -odt char)。
然后将根据修复的T1到MNI152的转换矩阵,将legion mask 转换到MNI空间,要注意,这里转化的时候选择邻近值插入,而不是差值/线性插入。
为什么要用mri_synthsr转换,而不是原始T1像转换,因为中风后的图像被破坏的很严重,使用自动分割工具会严重识别错误,所以需要先修复。

第二种:
当然,mri_synthsr在大多数情况下会表现的很好。
但是也有一些情况,由于受损面积太大,mri_synthsr表现的并不好,这个时候怎么办?正确的方法是翻转后使用对侧同源信号,然后进行一系列处理,然后再去掉这部分信号。
具体包括画出病灶,生成二值mask,然后使用命令 (fslswapdim LV_R -x y z LV_L,注意-x代表在x上翻转)翻转二值mask,就得到了对侧legion mask,然后把对侧图象剪切下来再翻转回来,这就是同源信号。
2008年的文章《Enantiomorphic normalization of focally lesioned brains》说,由于病灶存在,大脑预处理时的归一化等会受损(In the presence of focal brain lesions, automated methods for performing such so-called normalization are liable to distortion from the abnormal signal within the lesion, especially when the non-linear warping necessary for maximum registration fidelity is used.),因此建议使用来自对侧半球内未受损同源区域的信息来校正病变内的信号。但是这个方法的缺点在于,病灶必须不能超过中线部分。
总结就是,使用未受损侧部分的信号,来校正受损侧部分的信号,然后进行后续的正常处理步骤。

那么问题来了,对于想翻转病灶,例如收了30个病人,20个病灶左侧,10个病灶右侧,应该如何办呢?
为什么要翻转?是为了数据的统一,方便分析,增加样本量等等原因。
那么通常的思考有2种。
第一是把图像整体全部翻转,也就是说病灶+全部脑组织都翻转,左右对调。
第二是把仅仅把病灶翻转,即把对侧正常组织映射到病灶处,然后扣掉对侧正常组织,也就是说仅病灶翻转,全部脑组织不翻转。

这两种方法我也拿不准。

tips:不要让病灶有nan,spm软件喜欢生成nan,但是这样在使用其他软件时会出错,尽量保证数据全部以数字的形式,把nan用0替换(fslmaths lesion -nan lesion2)。

ITK-SNAP,这是一个可视化的3D软件,可以将画出的病灶可视化。但是有个问题在于,snap会将sform设置为0,使用qform,而fsl等软件使用sform。因此要基于fslorient的q2s.sh脚本将qform复制到sform,这样就能在其他软件上使用可视化。

q2s.sh:

#!/bin/bash

: <<COMMENTBLOCK
copy qform to sform for all NIFTI images in the current directory.
The qform will always fit in the s-form, but not vice versa.
COMMENTBLOCK

# If there is an argument
if [ $# -eq 1 ]; then
  img=$1
  fslorient -copyqform2sform ${img}
  #sqdiff.sh ${img}
else # if there are no arguments
  echo "Run q2s.sh on all NIFTI images in this directory?"
  echo "yes to continue"
  echo "hit any other key to abort and view help."
  read answer
  if [ "$answer" = "yes" ]; then
    echo "applying q2s to all image files in the directory"
    for img in *.nii *.nii.gz; do
      if [ -e  ${img} ]; then
        echo "image is ${img}"
        fslorient -copyqform2sform ${img}
        sqdiff.sh ${img}
      fi
    done
  else
    echo "HELP on q2s.sh"
    echo "===================="
    echo "With one image file as the argument,"
    echo "e.g., q2s.sh mask"
    echo "q2s.sh copies the qform to the sform for that image."
    echo "--------------------"
    echo "With no arguments, q2s.sh asks what you want."
    echo "IF you answer yes,"
    echo "then q2s.sh runs on all NIFTI images in the current directory."
    echo "Otherwise, hit any key to see this help message."
    echo ""
    echo "The qform will always fit in the s-form, but not vice versa."
    echo "So, the s-form and q-form should be equivalent after applying this"
    echo "but, you may lose scale and shear information."
  fi
fi
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

clancy_wu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值