Longitudinal data


#1

Dear Julien,
I wonder how to deal with longitudinal data in segmentation?Same code to the cross-sectional data?

Thanks


#2

Hi,
Yes, it would essentially be the same code that you would apply to each time point.
Best,
Julien


#3

Dear Julien,
I have finished my longitudinal data in segmentation by using the same code to each time point,I found something wrong about my results.There are differernce in slices(z),and some CSAs are very different between two time points.In my opinion,the slices(Z) shold in the same level,so I can confer that the CSA in two time point are the same position.I calculated the CSA of the upper part of the spinal cord using the head 3D-T1,the image usually to the C3 level,so I calculated the CSA of C2-3 level. What should I do to ensure that the CSA at the two time points is the same place?
Thanks a lot!


#4

Hi,
To ensure that CSA is calculated at the same level everytime, you have two options:

  1. You check what z value corresponds to C2-C3 for each time point (e.g. t0: z=15, t1: z=13, etc.)
  2. You use sct_label_vertebrae to label your vertebrae and compute CSA based on vertebral labeling (instead of from manually checking z value at each time point)

You can find more information in the latest SCT course.

Best,
Julien


#5

Dear Julien,
This code is what I used
sct_deepseg_sc -i T1.nii.gz -c t1 -centerline svm
sct_label_vertebrae -i T1.nii.gz -s T1_seg.nii.gz -c t1
sct_process_segmentation -i T1_seg.nii.gz -p csa -vert 2:3 -vertfile T1_seg_labeled.nii.gz

I have used sct_label_vertebrae.


#6

OK, now i understand better your original message. So, yes: it is expected that the z associated with the same vertebral level would change across time, if the slice positioning is not exactly the same.

Then, to explain CSA differences across time, there are two things you could check: the quality of the segmentation and the quality of the vertebral labeling. Use the flag -qc at the end of your command (e.g. sct_deepseg_sc -i T1.nii.gz -c t1 -centerline svm -qc ~/qc_report), then zip the qc_report folder and upload it here so we can give you constructive feedback.

Cheers,
Julien


#7

qc_report.zip (3.2 MB)


#8

Hi,
OK, there is definitely a problem with vertebral labeling, as I’m sure you also saw on the QC. Could you please let us know what version of SCT you used?
Cheers,
Julien


#9

Hi Julien
I used spinal cord toolbox-3.2.7. I think maybe I should performe image registration to each time point and then do the analysis.
Thanks!


#10

Hi,
i recommend you use manual initialization for the labeling, as explained here.
And yes, you would run the analysis for each time point independently.
Best
Julien


#11

Hi
Thank you very much,I will try. Also whether should I use the SPM-Realign(or Coregister) to deal with each time point before I labled?
Best


#12

Hi,

I don’t see the reason for using SPM-realign on the images before labeling them. Non-rigid realignment might cause morphologic deformations, which in turn would cause biases when computing CSA.

Unless you have other processing in mind?
Best
Julien


#13

Hi,
I understand what you said.Thank you very much.

Best


#14

Dear Julien,
Sorry for bother you in as many days, but I can’t figure out what is going on.


Any help would be appreciated.


#15

Hi,
you probably have empty slices in your segmentation (i.e. trying to compute CSA on an empty slice). How does your segmentation look like?


#16

Hi,
Here is my segementation image,and I want to caculate the CSA of C2-C3.T1_seg.nii.gz (425.1 KB)
T1_seg_labeled.nii.gz (424.4 KB)


#17

Hi,

I’ve ran the following command on my end, and it ran without an error:

sct_process_segmentation -i T1_seg.nii.gz -vert 2:3 -vertfile T1_seg_labeled.nii.gz 

Here is the output: csa.csv (726 Bytes)

It looks like you encountered a bug, which has now been fixed in the latest version 4.0.0-beta.4. Could you please try to install it and let us know if it solves your bug?

Best,
Julien