-
Notifications
You must be signed in to change notification settings - Fork 6
/
GE27ReadInfo.py
29 lines (21 loc) · 1.11 KB
/
GE27ReadInfo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import math
def GE27ReadInfo(ds, dirName):
if int(ds.SeriesNumber) % 100 == 0:
PathFlowDataMAG = dirName
seriesBase = int(ds.SeriesNumber)
#if 200 <= int(ds.SeriesNumber) <= 299:
if int(ds.SeriesNumber) == seriesBase+1:
PathFlowDataRL = dirName
# ConstDimsTemp = (int(ds.Rows), int(ds.Columns), int(ds.ImagesInAcquisition), int(ds.CardiacNumberOfImages))
ConstDimsTemp = (int(ds.Rows), int(ds.Columns), math.ceil(len(filesListTEMP)/ int(ds.CardiacNumberOfImages)), int(ds.CardiacNumberOfImages))
dXY = ds.PixelSpacing
dZ = ds.SpacingBetweenSlices
pixel_spc = (dXY[0],dXY[1],dZ)
#print(pixel_spc)
if int(ds.SeriesNumber) == seriesBase+2:
#if 300 <= int(ds.SeriesNumber) <= 399:
PathFlowDataAP = dirName
# if 400 <= int(ds.SeriesNumber) <= 499:
if int(ds.SeriesNumber) == seriesBase+3:
PathFlowDataSI = dirName
return PathFlowDataMAG, PathFlowDataRL, PathFlowDataAP, PathFlowDataSI