
Last chance! 50% off unlimited learning
Sale ends in
Extracts offsets of the IFDs (Image Field Directories) within a XIF file. Users are highly encouraged to read TIFF specifications to have a better understanding about what offsets and IFDs are.
getOffsets(fileName, fast = TRUE, display_progress = TRUE, verbose = FALSE)
an integer vector of class `IFC_offset` of IFDs offsets found in XIF file.
path to file.
whether to fast extract objects or not. Default is TRUE.
Meaning that offsets will be extracting expecting that objects are stored in ascending order.
A message will be thrown since fast extraction method does not ensure correct mapping between objects and offsets.
If set to FALSE, all object_ids will be scanned from 'fileName' to ensure extraction of desired offsets.
whether to display a progress bar. Default is TRUE.
whether to display information (use for debugging purpose). Default is FALSE.
Offsets are byte positions of IFDs found within RIF or CIF file. For more details see TIFF specifications.
if(requireNamespace("IFCdata", quietly = TRUE)) {
## use a cif file
file_cif <- system.file("extdata", "example.cif", package = "IFCdata")
system.time(offsets_fast <- getOffsets(fileName = file_cif, fast = TRUE))
system.time(offsets_slow <- getOffsets(fileName = file_cif, fast = FALSE))
identical(offsets_fast, offsets_slow)
} else {
message(sprintf('Please run `install.packages("IFCdata", repos = "%s", type = "source")` %s',
'https://gitdemont.github.io/IFCdata/',
'to install extra files required to run this example.'))
}
Run the code above in your browser using DataLab