|
a |
|
b/RadETL/R/imageNo_ImageTable.R |
|
|
1 |
#' 'imageNo' |
|
|
2 |
#' |
|
|
3 |
#' imageNo function will indicate order of DICOM images in specific radiologyOccurrenceId, and radiologyPhaseConceptId |
|
|
4 |
#' |
|
|
5 |
#' |
|
|
6 |
#' @param DICOMList you can put it like this and then run the function : DICOMList<-DICOMHeaderList(DICOMFolderPath) |
|
|
7 |
#' @import dplyr |
|
|
8 |
#' @importFrom magrittr "%>%" |
|
|
9 |
#' |
|
|
10 |
#' |
|
|
11 |
#' @return A list indicating order of DICOM images in specific radiologyOccurrenceId, and radiologyPhaseConceptId |
|
|
12 |
#' @examples |
|
|
13 |
#' DICOMList<-DICOMHeaderList(DICOMFolderPath) |
|
|
14 |
#' imageNo(DICOMList) |
|
|
15 |
#' @export |
|
|
16 |
|
|
|
17 |
imageNo<-function(DICOMList){ |
|
|
18 |
imageNo<-cbind(imageId(DICOMList),radiologyOccurrenceId(DICOMList), radiologyPhaseConceptId(DICOMList)) |
|
|
19 |
imageNo<-imageNo%>%dplyr::group_by(radiologyOccurrenceId, radiologyPhaseConceptId)%>%dplyr::mutate(imageNo=row_number()) |
|
|
20 |
imageNo<-imageNo%>%dplyr::group_by(radiologyOccurrenceId, radiologyPhaseConceptId)%>%dplyr::mutate(phaseTotalNo=n()) |
|
|
21 |
imageNo<-imageNo[, c(1, 4, 5)] |
|
|
22 |
return(imageNo) |
|
|
23 |
} |
|
|
24 |
|