dicom.parser {espadon} | R Documentation |
Conversion of DICOM raw data into a dataframe or a list of DICOM TAG information
Description
The dicom.parser
function creates a dataframe or a list from
DICOM raw data. The created dataframe or list provides information about the
content of the DICOM TAGs included in the raw data.
Usage
dicom.parser(
dcm,
as.txt = TRUE,
nested.list = FALSE,
try.parse = FALSE,
txt.sep = "\\",
txt.length = 100,
tag.dictionary = dicom.tag.dictionary(),
...
)
Arguments
dcm |
espadon object of class "volume", "rtplan", "struct" provided by DICOM files, or DICOM filename, or Rdcm filename, or raw vector representing the binary extraction of the DICOM file. |
as.txt |
Boolean. If |
nested.list |
Boolean. Only used if |
try.parse |
Boolean. If |
txt.sep |
String. Used if |
txt.length |
Positive integer. Used if |
tag.dictionary |
Dataframe, by default equal to dicom.tag.dictionary, whose structure it must keep. This dataframe is used to parse DICOM files. |
... |
Additional argument |
Value
Returns a list of elements or a dataframe, depending on as.list
.
If it returns a dataframe, the columns are names TAG, VR (value representation),
VM (value multiplicity), loadsize and Value. The field $Value
is a string
representation of the true value.
If it returns a list, each of its elements, named by a TAG, is either
a vector or a string, depending of the TAG included in dicom.raw.data
.
See Also
dicom.raw.data.loader, dicom.tag.parser, dicom.viewer,xlsx.from.dcm,xlsx.from.Rdcm
Examples
# content of the dummy raw data toy.dicom.raw (), as a list.
L <- dicom.parser (toy.dicom.raw (), as.txt = FALSE)
str(L[40:57])
L <- dicom.parser (toy.dicom.raw (), as.txt = FALSE, nested.list = TRUE)
str(L[40:45])
# content of the dummy raw data toy.dicom.raw (), as a dataframe.
L <- dicom.parser (toy.dicom.raw (), as.txt = TRUE)
str (L)