Skip to content

Commit

Permalink
Merge branch 'feat/fix-issue-#33' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudius-Appel committed May 16, 2024
2 parents 2f1cd92 + 48a07e1 commit 488a87b
Show file tree
Hide file tree
Showing 45 changed files with 147 additions and 100 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: duflor
Title: Plant Image Analysis For Determination of Leaf- and Root-Area
Version: 0.0.1.9026
Version: 0.0.1.9027
Author: Claudius Appel
Authors@R: c(
person("Claudius", "Appel", email = "claudius.appel@freenet.de" , role = c("aut", "cre"))
Expand Down
49 changes: 30 additions & 19 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ knitr::opts_chunk$set(
)
```

# duflor <a href="https://github.com/Claudius-Appel/duflor/"><img src="man/figures/logo.png" align="right" height="139" alt="duflor website" /></a>
# duflor <a href="https://github.com/Claudius-Appel/duflor/"><img src="man/figures/logo.png" alt="duflor website" align="right" height="139"/></a>

<!-- badges: start -->
[![R-CMD-check: Dev](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml/badge.svg?branch=dev)](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/Claudius-Appel/duflor/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Claudius-Appel/duflor?branch=master)

[![R-CMD-check: Dev](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml/badge.svg?branch=dev)](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml) [![codecov](https://codecov.io/gh/Claudius-Appel/duflor/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Claudius-Appel/duflor?branch=master)

<!-- badges: end -->

## Overview

Duflor is a package to detect and quantify number of pixels in any subrange(s) of HSV-color space declared by an upper and lower bound. While the package is principally task-agnostic and could work on any sort of HSV-range(s), it is developed for the detection and quantification of plant area.


## Installation

You can install the development and release versions of `duflor` like so:
Expand All @@ -47,41 +47,52 @@ devtools::install_github("https://github.com/Claudius-Appel/duflor@dev"

Vignettes are rendered documents discussing specific topics within a package. Installing them is recommended, but not required for utilising the package itself.

**If the front-end shiny-application within the `duflor_gui`-package is to be used, it is strongly recommended to follow the installation-guide for that package instead.**

### Prerequisites

Installing this package from GitHub requires the installation of the R-package `devtools`:

``` r
``` r
install.packages("devtools")
```

#### Install Rtools (windows-only) {#install-rtools-windows-only}

On windows, Rtools must be installed for your respective R-Version in order to compile this package from source (as it contains `cpp`-code). For more information, refer to "<https://r-pkgs.org/setup.html#setup-tools>".

If you are not on windows, you can skip this step. There are certain scenarios in which you will be unable to build packages from source on MacOS and linux machines as well. In these cases, refer to the documentation provided for the respective platform in the link above.

For windows, the R-package `installr` may be used to check if Rtools is already installed, and whether or not it has been found by R. Additionally, it will notify the user if a new R-update is available (major and minor versions only, ignores patch versions):

``` r
install.packages("installr") # once pkgbuild is installed, run: installr::install.Rtools(check = T,check_r_update = T,GUI = T)
```

## Usage

For detailed documentation, refer to https://claudius-appel.github.io/duflor/
For detailed documentation, refer to <https://claudius-appel.github.io/duflor/>

Additionally, various topics have more detailed articles, accessible on the aforementioned website, as well as within R via `browseVignettes()`. While access from within R is possible, it is generally recommended to view the articles via the website.

### A small sidenote on options set by duflor:

Upon loading, duflor will set the following options via `options(XX)`:

Upon loading, duflor will set the following options via `options(XX)`:
- `duflor.default_hsv_spectrums`: default HSV-ranges for
- drought leaf-area
- green leaf-area
- complete leaf-area
- identifier area
- `duflor.default_identifier_area`: the size of the `identifier_dot` in [cm\^2].

- duflor.default_hsv_spectrums: default HSV-ranges for
- drought leaf-area
- green leaf-area
- complete leaf-area
- identifier area
- duflor.default_identifier_area: the size of the `identifier_dot` in [cm^2].
Their values can be retrieved via `getOption(option)`:

Their values can be retrieved via `getOption(option)`.
``` r
getOption("duflor.default_hsv_spectrums")
getOption("duflor.default_identifier_area")
```

`duflor.default_hsv_spectrums` is merely used as a shortcut to load the currently-set default hsv ranges. It is not intended to be modified; as it serves no internal use.
`duflor.default_identifier_area` is more likely to require modification. Before calculating the area for each spectrum via `duflor::pixels_to_area(pixel.counts)`, the true area of the identifier-dot must be set via this option. The default is set to `r 0.503`. All areas are assumed to be in [cm^2].

- `duflor.default_hsv_spectrums` is merely used as a shortcut to load the currently-set default hsv ranges. It is not intended to be modified; as it serves no internal use.

## Further Documentation
TODO
- `duflor.default_identifier_area` is more likely to require modification. Before calculating the area for each spectrum via `duflor::pixels_to_area(pixel.counts)`, the true area of the identifier-dot must be set via this option. The default is set to `r 0.503`. All areas are assumed to be in [cm\^2].
52 changes: 38 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# duflor <a href="https://github.com/Claudius-Appel/duflor/"><img src="man/figures/logo.png" align="right" height="139" alt="duflor website" /></a>
# duflor <a href="https://github.com/Claudius-Appel/duflor/"><img src="man/figures/logo.png" alt="duflor website" align="right" height="139"/></a>

<!-- badges: start -->

[![R-CMD-check:
Dev](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml/badge.svg?branch=dev)](https://github.com/Claudius-Appel/duflor/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/Claudius-Appel/duflor/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Claudius-Appel/duflor?branch=master)

<!-- badges: end -->

## Overview
Expand Down Expand Up @@ -43,6 +44,10 @@ Vignettes are rendered documents discussing specific topics within a
package. Installing them is recommended, but not required for utilising
the package itself.

**If the front-end shiny-application within the `duflor_gui`-package is
to be used, it is strongly recommended to follow the installation-guide
for that package instead.**

### Prerequisites

Installing this package from GitHub requires the installation of the
Expand All @@ -52,6 +57,27 @@ R-package `devtools`:
install.packages("devtools")
```

#### Install Rtools (windows-only)

On windows, Rtools must be installed for your respective R-Version in
order to compile this package from source (as it contains `cpp`-code).
For more information, refer to
<https://r-pkgs.org/setup.html#setup-tools>”.

If you are not on windows, you can skip this step. There are certain
scenarios in which you will be unable to build packages from source on
MacOS and linux machines as well. In these cases, refer to the
documentation provided for the respective platform in the link above.

For windows, the R-package `installr` may be used to check if Rtools is
already installed, and whether or not it has been found by R.
Additionally, it will notify the user if a new R-update is available
(major and minor versions only, ignores patch versions):

``` r
install.packages("installr") # once pkgbuild is installed, run: installr::install.Rtools(check = T,check_r_update = T,GUI = T)
```

## Usage

For detailed documentation, refer to
Expand All @@ -66,29 +92,27 @@ view the articles via the website.

Upon loading, duflor will set the following options via `options(XX)`:

- duflor.default_hsv_spectrums: default HSV-ranges for
- `duflor.default_hsv_spectrums`: default HSV-ranges for
- drought leaf-area
- green leaf-area
- complete leaf-area
- identifier area
- duflor.default_identifier_area: the size of the `identifier_dot` in
- `duflor.default_identifier_area`: the size of the `identifier_dot` in
\[cm^2\].

Their values can be retrieved via `getOption(option)`.
Their values can be retrieved via `getOption(option)`:

``` r
getOption("duflor.default_hsv_spectrums")
getOption("duflor.default_identifier_area")
```

`duflor.default_hsv_spectrums` is merely used as a shortcut to load the
currently-set default hsv ranges. It is not intended to be modified; as
it serves no internal use. `duflor.default_identifier_area` is more
likely to require modification. Before calculating the area for each
spectrum via `duflor::pixels_to_area(pixel.counts)`, the true area of
the identifier-dot must be set via this option. The default is set to
0.503. All areas are assumed to be in \[cm^2\].

## Further Documentation
- `duflor.default_hsv_spectrums` is merely used as a shortcut to load
the currently-set default hsv ranges. It is not intended to be
modified; as it serves no internal use.

TODO
- `duflor.default_identifier_area` is more likely to require
modification. Before calculating the area for each spectrum via
`duflor::pixels_to_area(pixel.counts)`, the true area of the
identifier-dot must be set via this option. The default is set to
0.503. All areas are assumed to be in \[cm^2\].
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/articles/duflor.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions docs/articles/general_workflow.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions docs/articles/optimising_for_speed.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 488a87b

Please sign in to comment.