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