{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "Tce3stUlHN0L" }, "source": [ "##### Copyright 2019 The TensorFlow IO Authors." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "cellView": "form", "execution": { "iopub.execute_input": "2021-08-25T20:26:15.655766Z", "iopub.status.busy": "2021-08-25T20:26:15.654034Z", "iopub.status.idle": "2021-08-25T20:26:15.657992Z", "shell.execute_reply": "2021-08-25T20:26:15.658402Z" }, "id": "tuOe1ymfHZPu" }, "outputs": [], "source": [ "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n", "# you may not use this file except in compliance with the License.\n", "# You may obtain a copy of the License at\n", "#\n", "# https://www.apache.org/licenses/LICENSE-2.0\n", "#\n", "# Unless required by applicable law or agreed to in writing, software\n", "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", "# See the License for the specific language governing permissions and\n", "# limitations under the License." ] }, { "cell_type": "markdown", "metadata": { "id": "qFdPvlXBOdUN" }, "source": [ "# 의료 영상용 DICOM 파일 디코딩하기" ] }, { "cell_type": "markdown", "metadata": { "id": "MfBg1C5NB3X0" }, "source": [ "
![]() | \n",
" ![]() | \n",
" ![]() | \n",
" ![]() | \n",
"
preserve
는 값을 그대로 유지하며, 가능한 최대 출력보다 큰 입력 값은 잘립니다.\n",
"- **`dtype`**: `tf.uint8, tf.uint16, tf.uint32, tf.uint64, tf.float16, tf.float32, tf.float64`에서 선택할 수 있는 `tf.DType`입니다. 기본값은 `tf.uint16`입니다.\n",
"- **`name`**: 연산의 이름(선택 사항)\n",
"\n",
"`dtype` 유형의 A `Tensor`를 **반환**하고 형상은 DICOM 파일에 의해 결정됩니다.\n",
"\n",
"### DICOM 태그 데이터 가져오기\n",
"\n",
"```python\n",
"io.dicom.decode_dicom_data( contents, tags=None, name=None )\n",
"```\n",
"\n",
"- **`contents`**: 문자열 유형의 텐서입니다(0-D). 바이트 문자열로 인코딩된 DICOM 파일\n",
"- **`tags`**: 모든 차원의 `tf.uint32` 유형 텐서입니다. 이러한 `uint32` 숫자는 DICOM 태그에 직접 매핑됩니다.\n",
"- **`name`**: 연산의 이름(선택 사항)\n",
"\n",
"`tf.string` 유형의 `Tensor` 및 `tags`와 동일한 형상을 **반환**합니다. dicom 태그가 문자열 목록인 경우, 목록이 하나의 문자열로 결합되고 이중 백슬레시 ``tf.string` 유형의 `Tensor` 및 `tags`와 동일한 형상을 **반환**합니다. dicom 태그가 문자열 목록인 경우, 목록이 하나의 문자열로 결합되고 이중 백슬레시 로 분리됩니다. 태그가 숫자 목록인 경우 [DCMTK](https://support.dcmtk.org/docs/)에 버그가 있으며 0번째 요소만 문자열로 반환됩니다.\n",
"\n",
"### Bibtex\n",
"\n",
"이 패키지가 도움이 되었다면 아래 내용을 인용해주세요.\n",
"\n",
"```\n",
"@misc{marcelo_lerendegui_2019_3337331, author = {Marcelo Lerendegui and Ouwen Huang}, title = {Tensorflow Dicom Decoder}, month = jul, year = 2019, doi = {10.5281/zenodo.3337331}, url = {https://doi.org/10.5281/zenodo.3337331} }\n",
"```\n",
"\n",
"### 라이선스\n",
"\n",
"Copyright 2019 Marcelo Lerendegui, Ouwen Huang, Gradient Health Inc.\n",
"\n",
"Apache 라이선스 버전 2.0(\"라이선스\")에 따라 사용이 허가되었습니다. 라이선스를 준수하지 않으면 이 파일을 사용할 수 없습니다. 다음 위치에서 라이선스 사본을 얻을 수 있습니다.\n",
"\n",
"http://www.apache.org/licenses/LICENSE-2.0\n",
"\n",
"관련 법률에서 요구하거나 서면으로 합의한 경우가 아니면 라이선스에 따라 배포된 소프트웨어는 명시적이든 묵시적이든 어떤 종류의 보증이나 조건도 없이 \"있는 그대로\" 배포됩니다. 라이선스에 따른 권한 및 제한 사항을 규정하는 특정 언어는 라이선스를 참조하세요."
]
}
],
"metadata": {
"colab": {
"collapsed_sections": [
"Tce3stUlHN0L"
],
"name": "dicom.ipynb",
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 0
}