@@ -104,12 +104,12 @@ that use `r Biocpkg("ImageArray")` can rasterize images by defining thresholds
104104for the pixel dimensions of the levels that are realized to the memory.
105105
106106Here, by using the ` max.pixel.size ` , we request ` r Biocpkg("ImageArray") ` to
107- return a pyramid level whose both width (` X ` ) and height (` Y ` ) are lower than
108- 300 .
107+ return a pyramid level whose both width (` X ` ) and height (` Y ` ) are lower than,
108+ for example, 400.
109109
110110``` {r visualize_read2}
111111# visualize
112- bfa.raster <- as.raster(imgarray, max.pixel.size = 300 )
112+ bfa.raster <- as.raster(imgarray, max.pixel.size = 400 )
113113dim(bfa.raster)
114114```
115115
@@ -122,7 +122,7 @@ imgarray_rotated <- rotate(imgarray, degrees = 90)
122122imgarray_rotated
123123
124124# visualize
125- bfa.raster <- as.raster(imgarray_rotated, max.pixel.size = 300 )
125+ bfa.raster <- as.raster(imgarray_rotated, max.pixel.size = 400 )
126126plot(bfa.raster)
127127```
128128
@@ -133,15 +133,11 @@ imgarray_cropped <- imgarray[300:500, 200:300]
133133imgarray_cropped
134134
135135# visualize
136- bfa.raster <- as.raster(imgarray_cropped, max.pixel.size = 300 )
136+ bfa.raster <- as.raster(imgarray_cropped, max.pixel.size = 120 )
137137plot(bfa.raster)
138138
139139imgarray_cropped <- crop(imgarray, ind = list(300:500, 200:300))
140140imgarray_cropped
141-
142- # visualize
143- bfa.raster <- as.raster(imgarray_cropped, max.pixel.size = 300)
144- plot(bfa.raster)
145141```
146142
147143## magick images
@@ -188,11 +184,11 @@ You can again use either `max.pixel.size` or `min.pixel.size` to control
188184the output or level.
189185
190186``` {r ometiffvis2, out.width="50%"}
191- bfa.raster <- as.raster(img , max.pixel.size = 300)
187+ bfa.raster <- as.raster(imgarray , max.pixel.size = 300)
192188plot(bfa.raster)
193189dim(bfa.raster)
194190
195- bfa.raster <- as.raster(img , level = 1)
191+ bfa.raster <- as.raster(imgarray , level = 1)
196192plot(bfa.raster)
197193dim(bfa.raster)
198194```
@@ -241,6 +237,7 @@ imgarray_sub <- crop(imgarray, ind = list(16000:19000, 7000:10000))
241237
242238# convert to raster
243239img_raster <- as.raster(imgarray_sub, max.pixel.size = 800)
240+ dim(img_raster)
244241
245242# plot with ggplot
246243ggplot2::ggplot(data.frame(x = 0, y = 0),
0 commit comments