Skip to content

Commit

Permalink
pad edit
Browse files Browse the repository at this point in the history
- only need to pad radius, not whole window. Should not affect calculations, but may slightly improve speed.
  • Loading branch information
ailich committed Sep 28, 2021
1 parent fd871cc commit 085dae5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: GLCMTextures
Title: Calculates GLCM Textures of raster layers
Version: 0.11
Version: 0.11.1
Authors@R:
person(given = "Alex",
family = "Ilich",
Expand Down
2 changes: 1 addition & 1 deletion R/glcm_textures.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ glcm_textures<- function(r, w, n_levels, shift=list(c(1,0), c(1,1), c(0,1), c(-1
if(na_opt=="any"){
stop("if pad=TRUE, na_opt must be 'center' or 'all'")}
og_extent<- raster::extent(r)
r<- raster::extend(r, c(w[1], w[2]), value=NA)
r<- raster::extend(r, c((w[1]-1)/2, (w[2]-1)/2), value=NA)
}
if(quantization!="none"){
r<- quantize_raster(r = r, n_levels = n_levels, method = quantization, min_val = min_val, max_val = max_val)
Expand Down

0 comments on commit 085dae5

Please sign in to comment.