0

I did not understand the slice meaning in liver CT Scan images. can you explain it? Like in the below code.

for file in tqdm(os.listdir(para.test_seg_path)):

seg = sitk.ReadImage(os.path.join(para.test_seg_path, file))
seg_array = sitk.GetArrayFromImage(seg)

liver_slice = 0

for slice in seg_array:
    if 1 in slice or 2 in slice:
        liver_slice += 1

total_slice += seg_array.shape[0]
total_liver_slice += liver_slice
alift
  • 1,855
  • 2
  • 13
  • 28

2 Answers2

1

slice refers to the image you are taking of the liver in the CT, the way it is portrayed in the code is a sequential list of images(slices) of the liver

CarlosHU
  • 11
  • 2
0

It has nothing to do with coding, but it really needs the domain knowledge. Like any other data modeling, it is necessary to be aware of data meaning before applying any method. Here you need to know how CT works.

The way that CT works is by taking pictures of sliced organs without slicing them! Imagine the human body as a loaf of bread, and CT will get the images from the side of each sliced bread ( again without slicing them). So if a doctor needs to study the kidney for example, they do CT starting from the top of the kidney to the down. In this way they will obtain N slices. Then the radiologist will take a look at the slices, and depending on the doctor requirement, will choose few of slices which illustrates the desired target.

You can read more here: https://mysurgeryabroad.com/blog/multi-slice-ct-scanner/

I found this interesting photo for that link too:

enter image description here

{ Disclaimer: I am not a physician but I have read a bit about CT process before. So anybody who is expert can explain better than me of course. }

alift
  • 1,855
  • 2
  • 13
  • 28