@@ -8,10 +8,31 @@ library(readr)
88library(nbtrd )
99
1010
11- cts <- read_bullet(" /Users/stephanie/Documents/cts_set/scans/test_19-527_sample_F2/Item 1/Bullet A" )
12- image_x3p(cts $ x3p [[1 ]])
13- snapshot3d(filename = " ~/Documents/CTS19.1.A.png" )
11+ # cts <- read_bullet("/Users/stephanie/Documents/cts_set/scans/test_19-527_sample_F2/Item 1/Bullet A")
12+ # image_x3p(cts$x3p[[1]])
13+ # snapshot3d(filename ="~/Documents/CTS19.1.A.png")
14+ #
15+ # hamby <- read_bullet("/Users/stephanie/Documents/Hamby Set 44 Rescan Preprocessed/Barrel 1/Bullet 1")
16+ # image_x3p(hamby$x3p[[1]])
17+ # snapshot3d(filename ="~/Documents/hamby44.1.2.png")
1418
15- hamby <- read_bullet(" /Users/stephanie/Documents/Hamby Set 44 Rescan Preprocessed/Barrel 1/Bullet 1" )
16- image_x3p(hamby $ x3p [[1 ]])
17- snapshot3d(filename = " ~/Documents/hamby44.1.2.png" )
19+ main_dir <- " /Users/stephanie/Documents/Bullet_scans/St Louis"
20+
21+ files <- list.files(main_dir , pattern = " .dat" , full.names = TRUE )
22+ df <- readr :: read_delim(
23+ files [2 ],
24+ delim = " " ,
25+ col_names = c(" x" , " y" , " value" ),
26+ na = c(" " , " NA" , " 1.#QNAN0" ),
27+ progress = FALSE
28+ ) # There are no actual Nas created – probably because of the # in the name
29+
30+ # Should create a considerable number of NAs
31+ df $ value <- as.numeric(df $ value )
32+
33+ # Convert data frame into x3p. Value is measured in microns
34+ x3p <- x3ptools :: df_to_x3p(df )
35+ x3p_image(x3p )
36+
37+ # b1 <- read_bullet(main_dir)
38+ # x3p_image(b1$x3p[[1]])
0 commit comments