plot.BoneProfileR {BoneProfileR}R Documentation

Plot a bone section

Description

Display a bone section.
type value can be:
Image plot: original, mineralized, unmineralized, section
Original is the original image, mineralized is the mineral interpretation of the section, unmineralized is the unmineralized interpretation of the section, section is the interpretation of the section.
colors show the histograms of pixel information with foreground and background colors if they are defined.
3Dcolors show the pixels colors in 3D
Global analysis: observations, model, observations+model
Radial analysis: radial
If angle is not null and a radial analysis exists, it will show the model for this angle.
mcmc: It will show the posterior distribution of parameter

Usage

## S3 method for class 'BoneProfileR'
plot(
  x,
  message = NULL,
  type = "original",
  angle = NULL,
  show.centers = TRUE,
  show.colors = TRUE,
  show.grid = TRUE,
  analysis = 1,
  parameter.mcmc = "S",
  options.mcmc = list(),
  restorePar = TRUE,
  mar = NULL,
  angle.3D = 55,
  CI = "ML",
  radial.variable = "S",
  show.legend = TRUE,
  ...
)

Arguments

x

The bone image

message

The message to be displayed

type

The type of plot; see description

angle

Which angle model to show

show.centers

Should the centers be shown?

show.colors

Should the background and foreground colors be shown?

show.grid

Should the grid be shown?

analysis

Name or number of analysis to be plotted

parameter.mcmc

The posterior parameter to show for type = "mcmc"

options.mcmc

The option to plot type mcmc output

restorePar

If TRUE, restore the par parameter at the exit

mar

The margin for type being "model" or "observations"

angle.3D

The angle between x and y for 3Dcolors graph

CI

Which confidence interval should be plotted: MCMC or ML

radial.variable

Name of the radial variable to plot

show.legend

Should a legend be shown?

...

Not used

Details

plot.BoneProfileR displays a bone section

Value

Nothing

Author(s)

Marc Girondot marc.girondot@gmail.com

See Also

Other BoneProfileR: BP_AutoFit(), BP_ChooseBackground(), BP_ChooseCenter(), BP_ChooseForeground(), BP_DetectBackground(), BP_DetectCenters(), BP_DetectForeground(), BP_DuplicateAnalysis(), BP_EstimateCompactness(), BP_FitBayesianCompactness(), BP_FitMLCompactness(), BP_FitMLRadialCompactness(), BP_GetFittedParameters(), BP_ListAnalyses(), BP_LnLCompactness(), BP_OpenImage(), BP_Report(), Erinaceus_europaeus, summary.BoneProfileR()

Examples

## Not run: 
# Not run:
library(BoneProfileR)
 bone <- BP_OpenImage()
 # or 
 path_Hedgehog <- system.file("extdata", "Erinaceus_europaeus_fem_2-1_small.png", 
                             package = "BoneProfileR")
 bone <- BP_OpenImage(file=path_Hedgehog)
 bone <- BP_DetectBackground(bone=bone, analysis="logistic")
 bone <- BP_DetectForeground(bone=bone, analysis="logistic")
 plot(bone, type="colors")
 bone <- BP_DetectCenters(bone=bone, analysis="logistic")
 plot(bone, type="3Dcolors")
 bone <- BP_EstimateCompactness(bone, analysis="logistic", rotation.angle = 1)
 bone <- BP_FitMLCompactness(bone, analysis="logistic")
 plot(bone)
 # 
path_Hedgehog <- system.file("extdata", "Erinaceus_europaeus_fem_2-1_small.png", 
                             package = "BoneProfileR")
 bone <- BP_OpenImage(file=path_Hedgehog)
 bone <- BP_DetectBackground(bone=bone, analysis="logistic")
 bone <- BP_DetectForeground(bone=bone, analysis="logistic")
 bone <- BP_DetectCenters(bone=bone, analysis="logistic")
 bone <- BP_EstimateCompactness(bone, analysis="logistic")
 bone <- BP_FitMLCompactness(bone, analysis="logistic")
 plot(bone)
 plot(bone, type="observations")
 plot(bone, type="observations+model", analysis=1)
 bone <- BP_DuplicateAnalysis(bone, from="logistic", to="flexit")
 fittedpar <- BP_GetFittedParameters(bone, analysis="logistic")
 bone <- BP_DuplicateAnalysis(bone, from="logistic", to="flexit")
 bone <- BP_FitMLCompactness(bone, 
                fitted.parameters=c(fittedpar, K1=1, K2=1), 
                fixed.parameters=NULL, analysis="flexit")
 compare_AIC(Logistic=BP_GetFittedParameters(bone, analysis="logistic", alloptim=TRUE), 
             Flexit=BP_GetFittedParameters(bone, analysis="flexit", alloptim=TRUE))
 out4p <- plot(bone, type="observations+model", analysis="logistic")
 out6p <- plot(bone, type="observations+model", analysis="flexit")
 bone <- BP_FitBayesianCompactness(bone, analysis="logistic")
 plot(bone, type="observations+model", CI="MCMC")
 bone <- BP_FitMLRadialCompactness(bone)
 plot(bone, type="radial", radial.variable=c("P", "S"))
 plot(bone, type="radial", radial.variable=c("P", "S", "Min", "Max"))

## End(Not run)

[Package BoneProfileR version 2.5 Index]