tfio.image.decode_dicom_data
Stay organized with collections
Save and categorize content based on your preferences.
Getting DICOM Tag Data.
tfio.image.decode_dicom_data(
contents, tags=None, name=None
)
Used in the notebooks
This package has two operations which wrap DCMTK
functions.
decode_dicom_image
decodes the pixel data from DICOM files, and
decode_dicom_data
decodes tag information.
dicom_tags
contains useful DICOM tags such as dicom_tags.PatientsName
.
We borrow the same tag notation from the
pydicom
dicom package.
The detailed usage of DICOM is available in
tutorial.
If this package helped, please kindly cite the below:
@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 = {<a href="https://doi.org/10.5281/zenodo.3337331">https://doi.org/10.5281/zenodo.3337331</a>}
}
Args |
contents
|
A Tensor of type string. 0-D. The byte string encoded DICOM file.
|
tags
|
A Tensor of type tf.uint32 of any dimension.
These uint32 numbers map directly to DICOM tags.
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type tf.string and same shape as tags . If a dicom tag is
a list of strings, they are combined into one string and seperated by a
double backslash ``. There is a bug in
DCMTK if the tag is a list of numbers,
only the zeroth element will be returned as a string.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-15 UTC.
[null,null,["Last updated 2022-02-15 UTC."],[],[],null,["# tfio.image.decode_dicom_data\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/io/blob/v0.24.0/tensorflow_io/python/ops/dicom_ops.py#L94-L132) |\n\nGetting DICOM Tag Data. \n\n tfio.image.decode_dicom_data(\n contents, tags=None, name=None\n )\n\n### Used in the notebooks\n\n| Used in the tutorials |\n|-------------------------------------------------------------------------------------------|\n| - [Decode DICOM files for medical imaging](https://www.tensorflow.org/io/tutorials/dicom) |\n\nThis package has two operations which wrap `DCMTK` functions.\n`decode_dicom_image` decodes the pixel data from DICOM files, and\n`decode_dicom_data` decodes tag information.\n`dicom_tags` contains useful DICOM tags such as [`dicom_tags.PatientsName`](../../tfio/image/dicom_tags#PatientsName).\nWe borrow the same tag notation from the\n[`pydicom`](https://pydicom.github.io/) dicom package.\n\nThe detailed usage of DICOM is available in\n[tutorial](https://www.tensorflow.org/io/tutorials/dicom).\n\nIf this package helped, please kindly cite the below: \n\n @misc{marcelo_lerendegui_2019_3337331,\n author = {Marcelo Lerendegui and Ouwen Huang},\n title = {Tensorflow Dicom Decoder},\n month = jul,\n year = 2019,\n doi = {10.5281/zenodo.3337331},\n url = {\u003ca href=\"https://doi.org/10.5281/zenodo.3337331\"\u003ehttps://doi.org/10.5281/zenodo.3337331\u003c/a\u003e}\n }\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `contents` | A Tensor of type string. 0-D. The byte string encoded DICOM file. |\n| `tags` | A Tensor of type [`tf.uint32`](https://www.tensorflow.org/api_docs/python/tf#uint32) of any dimension. These `uint32` numbers map directly to DICOM tags. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type [`tf.string`](https://www.tensorflow.org/api_docs/python/tf#string) and same shape as `tags`. If a dicom tag is a list of strings, they are combined into one string and seperated by a double backslash \\`\\`. There is a bug in [DCMTK](https://support.dcmtk.org/docs/) if the tag is a list of numbers, only the zeroth element will be returned as a string. ||\n\n\u003cbr /\u003e"]]