IFCip package is under development and can be installed from github
-
install Rtools for windows
-
ensure that Rtools compiler is present in Windows PATH
In R console, if you installed Rtools directly on C: you should see something like C:\Rtools\bin and C:\Rtools\mingw_32\bin
print(unlist(strsplit(Sys.getenv("PATH"), ";")))
Otherwise, try to set it
shell('setx PATH "C:\\Rtools\\bin"')
shell('setx PATH "C:\\Rtools\\mingw_32\\bin"')
- install devtools
install.packages("devtools")
- install R dependencies required for IFCip package "Rcpp", "IFC", "methods", "future", "future.apply", "future.callr", "progressr"
install.packages(c("Rcpp", "IFC", "methods", "future", "future.apply", "future.callr", "progressr"))
- install "remotes", to install IFCip package from github remotes is needed.
install.packages("remotes")
- install IFCip
remotes::install_github(repo = "gitdemont/IFCip", ref = "master", dependencies = FALSE)
Several examples in IFCip package are dependent on data files that can be found in dedicated IFCdata package.
To install IFCdata package and run examples in IFCip:
install.packages("IFCdata", repos = "https://gitdemont.github.io/IFCdata/", type = "source")
IFCip contains a lots of exported and internal functions to deeply process IFC images.
IFCip is mostly written using Rcpp
which allows very fast processing of the images.
On top of all the tools in IFCip, ExtractFeatures() is certainly the most useful one since it can be use to easily compute a bulk of features from IFC files with minimal input from user. In addition, ExtractFeatures() has been designed to use parallel backend allowing for even faster computation.
ExtractFeatures() derives, extends, or relies on:
-
moments_Hu() to compute
Hu moments
allowing to extract:- Area
- circularity according to Joviša Žunić et al.
- Minor Axis
- Major Axis
- Aspect Ratio
- Angle
- theta
- eccentricity
- pix cx: x centroïd in pixels
- pix cy: y centroïd in pixels
- pix min axis: minor axis in pixels
- pix maj axis: major axis in pixels
- pix count: area in pixels
- image invariant moments
- skewness
- kurtosis
- Centroid X: scaled x centroïd
- Centroid Y: scaled y centroïd
- and intensity weighted values
-
moments_Zernike() to compute
Zernike moments
by projecting image on Zernike complex polynomials EBImage v3.12.0 -
compute_shape() to retrieve several
shape features
based notably oncontour tracing labeling
Chang, F. et al.,convex hull
computation from Andrew's Monotone Chain Algorithm reported by M. A. Jayaram, Hasan Fleyeh and bounding box determination thanks torotating calipers
as described by Pirzadeh, Hormoz under supervision of Godfried T. Toussaint:- Perimeter
- Diameter
- Circularity
- convexity
- roundness
- Height
- Width
- Elongatedness
- convex perimeter
- convex cx
- convex cy
-
compute_haralick() to extract
Haralick textural features
see Haralick's original paper and Löfstedt T. et al. used for the computation:- H Contrast
- H Correlation
- dissimilarity
- H Energy
- H Entropy
- homogeneity
- maximum probability
- inverse difference
- difference entropy
- difference variance
- H Homogeneity
- sum entropy
- sum variance
- cluster prominence
- cluster shade
- imc1
- imc2
-
compute_intensity() to extract image values of:
- Bkgd Mean/StdDev
- Min/Max/Mean Pixel
- Raw Min/Max/Mean Pixel
- Intensity
IFCip is a new born and under active development to optimize computations, include new features and improve.
Current API may change in the future resulting in function renaming and input or output modifications
Please take this into account and report bugs or address features implementations to help the development.
-
You are using this package on your own risk!
-
We do not guarantee privacy nor confidentiality.
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. In no event shall the copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.