[58c332]: / archives / RadETL / man / DicomRDS.Rd

Download this file

56 lines (48 with data), 1.5 kB

 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DicomRDS.R
\docType{data}
\name{DicomRDS}
\alias{DicomRDS}
\title{DicomRDS Class}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
DicomRDS
}
\arguments{
\item{data}{Data frame imported from DICOM RDS file}
}
\description{
This class is a class that imports various metadata by reading an RDS file containing DICOM information.
There are basically functions that import data related to Radiology CDM.
}
\examples{
############################# Example Code: Read DICOM RDS File ###################################
rdsFile <- list.files(path = "~/Radiology/rds_test", pattern = "\\\\.rds$", full.names = T, recursive = T)
# If single data (only one metadata in dicom file )
dcmRDS <- DicomRDS$new(data[[1]])
# Create Occurrence ID for radiology image
roID <- dcmRDS$createOccurrenceID()
# Get PatientID
patientid <- dcmRDS$getPatientID()
dcmRDS$getDirectoryID()
# This radiology contast or non-contrast
isContrast <- dcmRDS$isPost4BrainCT()
# If Multi data
data <- readRDS(file = rdsFile[5])
for(i in 1:length(data)) {
dcmRDS <- DicomRDS$new(data[[i]])
roID <- dcmRDS$createOccurrenceID()
patientid <- dcmRDS$getDirectoryID()
isContrast <- dcmRDS$isPost4BrainCT()
df <- data.frame(roID, patientid, isContrast)
}
df
######################################## Example Code: END ##########################################
}
\seealso{
https://github.com/OHDSI/Radiology-CDM/wiki
}
\author{
Neon K.I.D
}
\keyword{datasets}