[58c332]: / RadETL / R / DicomPath_ImageTable.R

Download this file

30 lines (27 with data), 725 Bytes

 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
#' 'DicomPath'
#'
#' DicomPath function indicates path of each DICOM files
#'
#'
#' @param DICOMList you can put it like this and then run the function : DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' @import dplyr
#' @importFrom magrittr "%>%"
#'
#'
#' @return A list indicating path of each DICOM files
#' @examples
#' DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' lapply(DICOMList)
#' @export
dicomPath<-function(DICOMList){
dicomPath<-lapply(DICOMList, function(x){
dicomPath<-names(x)
if(is.null(dicomPath)==T){
return('NA')
}
return(dicomPath)
})
dicomPath<-as.data.frame(do.call(rbind, dicomPath))
colnames(dicomPath)<-'dicomPath'
return(dicomPath)
}