본문 바로가기

카테고리 없음

DICOM Metadata

 

label data를 만들 때, 필요한 DICOM metadata의 tag목록의 함수이다.
patient_position은 이전에는 사용할 일이 없었는데, DICOM의 정보를 적용한 label의 경우에는
그냥 label의 raw데이터만 가져오면 방향이 안맞는 문제가 생겨서 사용하게 되었다.

 

 

def patient_position_info():
header_info = list()
# Patient Position
entryID = "0018|5100"
header_info.append(entryID)
# Image Position
entryID = "0020|0032"
header_info.append(entryID)
# Image Orientation
entryID = "0020|0037"
header_info.append(entryID)
# slice location
entryID = "0020|1041"
header_info.append(entryID)
return header_info

 

 

def patient_personal_info():
#patient sex, age, birthdate
header_info = list()
# patient name
entryID = "0010|0010"
header_info.append(entryID)
# patient birthdate
entryID = "0010|0030"
header_info.append(entryID)
# patient sex
entryID = "0010|0040"
header_info.append(entryID)
# patient age
entryID = "0010|1010"
header_info.append(entryID)
return header_info

 

def dicom_spacing_info():
#patient sex, age, birthdate
header_info = list()
# Pixel Spacing
entryID = "0028|0030"
header_info.append(entryID)
# Slice Thickness
entryID = "0018|0050"
header_info.append(entryID)
return header_info