Commit f916c7c9 authored by Björn Reineking's avatar Björn Reineking

Initial commit

parents
^vigratools\.Rproj$
^\.Rproj\.user$
.Rproj.user
.Rhistory
.RData
.Ruserdata
.DS_Store
Package: vigratools
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9000
Authors@R:
person(given = "First",
family = "Last",
role = c("aut", "cre"),
email = "first.last@example.com")
Description: What the package does (one paragraph).
License: What license it uses
Encoding: UTF-8
LazyData: true
Imports:
vigRa,
Rcpp
Roxygen: list(markdown = TRUE)
RoxygenNote: 6.1.0
SystemRequirements: C++11
LinkingTo:
Rcpp,
vigRa
# Generated by roxygen2: do not edit by hand
importFrom(Rcpp,sourceCpp)
useDynLib(vigratools, .registration = TRUE)
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Gaussian smoothing
#'
#' Perform isotropic Gaussian convolution. The function uses BORDER_TREATMENT_REFLECT.
#' @param x Numeric matrix
#' @param sigma Scale of the Gaussian kernel
#' @return Numeric matrix; smoothed version of x
gaussian_smoothing <- function(x, sigma) {
.Call(`_vigratools_gaussian_smoothing`, x, sigma)
}
#' @useDynLib vigratools, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL
#' @keywords internal
"_PACKAGE"
# vigratools
The goal of vigratools is to ...
## Installation
You can install the released version of vigratools from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("vigratools")
```
## Example
This is a basic example which shows you how to solve a common problem:
``` r
## basic example code
```
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{gaussian_smoothing}
\alias{gaussian_smoothing}
\title{Gaussian smoothing}
\usage{
gaussian_smoothing(x, sigma)
}
\arguments{
\item{x}{Numeric matrix}
\item{sigma}{Scale of the Gaussian kernel}
}
\value{
Numeric matrix; smoothed version of x
}
\description{
Perform isotropic Gaussian convolution. The function uses BORDER_TREATMENT_REFLECT.
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vigratools-package.R
\docType{package}
\name{vigratools-package}
\alias{vigratools}
\alias{vigratools-package}
\title{vigratools: What the Package Does (One Line, Title Case)}
\description{
What the package does (one paragraph).
}
\author{
\strong{Maintainer}: First Last \email{first.last@example.com}
}
\keyword{internal}
*.o
*.so
*.dll
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#include <Rcpp.h>
using namespace Rcpp;
// gaussian_smoothing
NumericMatrix gaussian_smoothing(NumericMatrix x, double sigma);
RcppExport SEXP _vigratools_gaussian_smoothing(SEXP xSEXP, SEXP sigmaSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< NumericMatrix >::type x(xSEXP);
Rcpp::traits::input_parameter< double >::type sigma(sigmaSEXP);
rcpp_result_gen = Rcpp::wrap(gaussian_smoothing(x, sigma));
return rcpp_result_gen;
END_RCPP
}
static const R_CallMethodDef CallEntries[] = {
{"_vigratools_gaussian_smoothing", (DL_FUNC) &_vigratools_gaussian_smoothing, 2},
{NULL, NULL, 0}
};
RcppExport void R_init_vigratools(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
}
//[[Rcpp::depends(vigRa)]]
#include <Rcpp.h>
#include <vigra/multi_array.hxx>
#include <vigra/convolution.hxx>
// #include <vigra/tensorutilities.hxx>
// #include <vigra/mathutil.hxx>
// #include <vigra/multi_tensorutilities.hxx>
using namespace Rcpp;
using namespace vigra;
//' Gaussian smoothing
//'
//' Perform isotropic Gaussian convolution. The function uses BORDER_TREATMENT_REFLECT.
//' @param x Numeric matrix
//' @param sigma Scale of the Gaussian kernel
//' @return Numeric matrix; smoothed version of x
// [[Rcpp::export]]
NumericMatrix gaussian_smoothing(NumericMatrix x, double sigma) {
const int nrows = x.nrow();
const int ncols = x.ncol();
Shape2 shape(nrows, ncols);
MultiArrayView<2, double> input_image(shape, x.begin());
NumericMatrix result(nrows, ncols);
MultiArrayView<2, double> output_image(shape, result.begin());
gaussianSmoothing(input_image, output_image, sigma);
return(result);
}
Version: 1.0
RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
Encoding: UTF-8
AutoAppendNewline: Yes
StripTrailingWhitespace: Yes
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment