jonclayden / mmand Goto Github PK
View Code? Open in Web Editor NEWMathematical Morphology in Any Number of Dimensions
Mathematical Morphology in Any Number of Dimensions
Hi there, I think I found another bug. Not 100% sure though, since am not fully able to deduce what the boxKernel()
is actually supposed to do in rescale()
. Anyway, when I do
mat <- raster::as.matrix(spObj)
mat_resc <- mmand::rescale(mat, 2, kernel)
spObj_resc <- raster::raster(mat_resc)
raster::extent(spObj_resc) <- raster::extent(spObj)
sp::proj4string(spObj_resc) <- sp::proj4string(spObj)
spObj obviously is a binary raster with certain dimensions (97, 201, 19497 (nrow, ncol, ncell)) and spObj_resc with double the nrows/ncols and four times the ncells (194, 402, 77988 (nrow, ncol, ncell)), as expected. What is not expected though, is that when plotting spObj_resc (raster::plot()
, but its the same with display()
on mat_resc
), I get a funny looking raster, where only the lower right cell (of four cells) is "filled" with a value, while the other three (presumably new created cells) have the value 0. This is also irrespective of binary or continuous raster.
Moreover, if I chose a values for factor
of for instance 0.5, something similar arises, however on the scale of the whole plot, only the upper left fourth of the downscaled plot is shown.
These issues don't seem to arise at least with the mnKernel(), didn't test the others though.
spObj is still the same.
Is it possible to create kernels that are e.g. 3D rods?
I.e. likely the equivalent of SE = strel('line',len,deg)
here:
Great package! I am about to use it as dependency for a package I am working on myself atm. However, I think I found a bug.
Consider the following code:
mat <- raster::as.matrix(spObj)
kernel <- shapeKernel(c(3, 3), type="diamond")
mat_cc <- mmand::components(mat, kernel)
It seems (at least on my machine) that connected components at the bottom and at the top share the same label. I think this is not intentional, is it? Here is spObj
Hi!
When i apply a literal value for the threshold, nothing is rendered when using 'display' on the resulting image. The matrix values are correct, but no image is displayed, only the quartz window pops up blank (when using method='kmeans' it works properly)
Any idea of what could it be?
Thanks in advance!
The type of morphology implemented seems to be "binary". Can it do "greyscale" morphology ? If not, could it be mentioned in the documentation ?
What gives a 3D voxel structure that's "coercible to an array"?
As required by e.g. morph?
Issues with OSX clang (which does not support openmp and -fopenmp
option), causes some errors with installation:
https://travis-ci.org/neuroconductor/mimosa/jobs/271315492 and https://travis-ci.org/muschellij2/mimosa/jobs/269751053.
May want to add something to the effect of
brew install gcc --without-multilib
with your installation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.