GithubHelp home page GithubHelp logo

aoles / rbioformats Goto Github PK

View Code? Open in Web Editor NEW
23.0 11.0 13.0 120.41 MB

:books: R interface to the Bio-Formats library

Home Page: https://bioconductor.org/packages/RBioFormats

R 75.57% Java 22.32% Makefile 2.10%
r image-processing bio-formats bioconductor

rbioformats's Introduction

R interface to Bio-Formats

RBioFormats is an R package which provides an interface to the OME Bio-Formats Java library. It facilitates reading of proprietary image data and metadata in R.

Installation

First, make sure you have JDK 1.8 or higher installed. To install RBioFormats use the biocLite installation script in order to resolve the dependency on the Bioconductor package EBImage.

if (!require("BiocManager", quietly=TRUE)) install.packages("BiocManager")
BiocManager::install("aoles/RBioFormats")

Mac OS X

Mac OS comes with a legacy Apple Java 6. In order to use RBioFormats, you will need to update your Java installation to a newer version provided by Oracle.

  1. Install Oracle JDK.

  2. Update R Java configuration by executing from the command line (you might have to run it as a super user by prepending sudo depending on your installation).

R CMD javareconf
  1. Re-install rJava from sources in order to properly link to the non-system Java installation.
install.packages("rJava", type="source")

You can verify your configuration by running the following commands. This should return the Java version string corresponding to the one downloaded and installed in step 1.

library(rJava)
.jinit()
.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
## [1] "1.8.0_112-b16" 

Documentation

To get started with using RBioFormats have a look at the package vignette.

FAQ

See my answers on Stack Overflow for solutions to some common and less common questions.

Caveats

The java.lang.OutOfMemoryError error

If you get the java.lang.OutOfMemoryError: Java heap space error, try increasing the maximum heap size by supplying the -Xmx parameter before the Java Virtual Machine is initialized. For example, use

options( java.parameters = "-Xmx4g" )
library( "RBioFormats" )

to override the default setting and assign 4 gigabytes of heap space to the Java environment.

Information about the current Java heap space limit can be retrieved by checkJavaMemory().

Use with BiocParallel

Each R process needs a separate JVM instance. For this, load the package in the parallelized function, e.g.,

bplapply (files, function(f) {
  library(RBioFormats)
  ...
})

rbioformats's People

Contributors

aoles avatar leej3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rbioformats's Issues

Poor performance of read.metadata compared to showinf from bftools

Calls to read.metadata take significantly longer than readout using the command line tool showinf from bftools. For example, for the sample file from #11 it's 6x slower.

library(RBioFormats)
library(magrittr)
library(microbenchmark)

f <- "Data1051.cxd"

microbenchmark(times = 10,
  a = read.metadata(f),
  b = system(paste0("bftools/showinf -nopix ", f), intern = TRUE)
)

## Unit: seconds
##  expr       min        lq      mean    median        uq       max neval
##     a 11.337970 11.822990 12.102046 12.004656 12.198552 13.531961    10
##     b  1.773676  1.836837  1.894419  1.859554  1.896917  2.275523    10

Slow to load when internet connection is on

I'm using RBioFormats v0.0.57 and rJava v0.9-13.
After last update of RBioFormats, thanks to add the possibility to load without internet connection.
A pair of days ago, I noticed the package is too slow to load in a fresh session.
Performing a microbenchmark, time consumed to load the package is dependent if there is an internet connection.
When my computer is offline, the loading time is around 1.32 seconds. On the other hand, when my computer is connected to internet, the loading time increase to 61 seconds!!
I noticed it, when performing a devtools::check() job to a package I'm developing, because I have to wait around 23 minutes to success. A pair of weeks ago, it was around 2 minutes. Posted in stackoverflow

normalize in read.image

When using
img <- RBioFormats::read.image(img_file, normalize = TRUE)
where img_file is a multi_channel, multi_Z file, the data does not seem to be mapped to [0,1] properly. If I then compute max(img) or max(img[,,1,]) I do not get a value of 1 as expected.

Currently I added an extra step to properly normalize the image

Greetings
Antonio

Saving OIB: metadata is lost

When saving this OIB file with RBioFormats the pixel size metadata is lost.

Here's what I did:

library(RBioFormats)
img = read.image("Image0010_01.oib", normalize = FALSE)[,,2]
write.image(img, "Image0010_01.ome.tiff", force = TRUE, pixelType = "uint16")

Doing the equivalent using the bfconvert command line tool preserves the pixel size metadata:

bfconvert Image0010_01.oib Image0010_01.ome.tiff

More info here: https://github.com/hmbotelho/oib_to_tif

RBioFormats on Conda

Hi,

This is more of a request than an issue, but can RBioFormats be available on Conda?

Many thanks,

RBioFormats not working offline

It looks like each time RBioFormats is called, it's downloading bioformats_package.jar from openmicroscopy.org.
This shouldn't be necessary after installation since the file should have already been downloaded at installation time.
Importantly this prevents using it in any offline application.
This is maybe a regression from #23.

Subset image in XY dimensions

Hello,

I was digging in the code but I can't find a way to read a subset of an image in the X and Y dimensions. I think this is possible with bioformats java library, would this be possible with the current version of RBioFormats? Or would there be a way to add this feature without recompiling the java code?

Thank you

read.image failing for very large images

For images with large pixel counts (eg: 8E8 pixels), read.image returns an error, even when trying to return a small subset of the image area.

img <- RBioFormats::read.image(filename, subset = list(X=10000:10200, Y=20000:20100))

Error in .jcall(reader, "I", "getSeriesCount") :
java.lang.IllegalArgumentException: Array size > Integer.MAX_VALUE!

Seems to be a limitation of the integer class itself, which maxes out at less than 3E8. Changing "I" classes to "J" throughout read.image.R doesn't help though.

Installation fails with slow internet, jar download times out

Hi and thanks for your work on this package. I'm encountering failed installation as it looks like the bioformats_package.jar file doesn't download before the timeout time is reached, even after resetting timeout options. Is there a workaround, e.g. set timeout option within installation or point to the already downloaded copy of the bioformats_package.jar ?

BiocManager::install("aoles/RBioFormats")
Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.4 (2021-02-15)
Installing github package(s) 'aoles/RBioFormats'
Downloading GitHub repo aoles/RBioFormats@HEAD
✓ checking for file ‘/private/var/folders/yc/c8pp68xn51jdhpkmmy5x7btxht2zk7/T/RtmpHGjaUi/remotes16f1096b903a/aoles-RBioFormats-c87bba1/DESCRIPTION’ ...
─ preparing ‘RBioFormats’:
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘RBioFormats_0.0.57.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'
Warning: invalid gid value replaced by that for user 'nobody'

  • installing source package ‘RBioFormats’ ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    trying URL 'https://downloads.openmicroscopy.org/bio-formats/6.1.0/artifacts/bioformats_package.jar'
    Content type 'application/x-java-archive' length 37460318 bytes (35.7 MB)
    ============================================
    downloaded 32.1 MB

Warning in utils::download.file(jar_url, jar_dst, mode = "wb", quiet = FALSE) :
downloaded length 33619968 != reported length 37460318
Warning in utils::download.file(jar_url, jar_dst, mode = "wb", quiet = FALSE) :
URL 'https://downloads.openmicroscopy.org/bio-formats/6.1.0/artifacts/bioformats_package.jar': Timeout of 60 seconds was reached
Error: package or namespace load failed for ‘RBioFormats’:
.onLoad failed in loadNamespace() for 'RBioFormats', details:
call: NULL
error: failed to download Bio-Formats Java library.
Check your internet connection and try again.
Error: loading failed
Execution halted
ERROR: loading failed

  • removing ‘/usr/local/lib/R/4.0/site-library/RBioFormats’
    Error: Failed to install 'RBioFormats' from GitHub:
    (converted from warning) installation of package ‘/var/folders/yc/c8pp68xn51jdhpkmmy5x7btxht2zk7/T//RtmpHGjaUi/file16f1074c9d4aa/RBioFormats_0.0.57.tar.gz’ had non-zero exit status

getOption("timeout")
[1] 300

Installation notes

I use the package RBioFormats and EBImage often, they are greatly appreciated.

I followed the instruction notes for MacOS on El Capitan (10.11.5); RStudio 1.0.153; R 3.4.1 "Single Candle" with JDK 1.8.0_131-b11 and everything worked great. By adding this line:
sudo ln -f -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib
before running:
install.packages("rJava", type="source") as per the installation instructions.

On a different system macOS Sierra (10.12.6); RStudio 1.1.419; R 3.4.3 "Kite-Eating Tree" with JDK "9.0.4+11" trying to install rJava as above gave me the "-fopenmp" error message.

By simply removing the type ="source" line it worked and I was able to install and use RBioFormats:
From install.packages("rJava", type="source")
To install.packages("rJava")

You may want to add this information to the installation instructions.

Error on install Linux R/4.2.0

Getting this trying to install on:
CentOS Linux release 7.7.1908 (Core)
R Under development (unstable) (2022-02-17 r81751) -- "Unsuffered Consequences"

Any ideas?

Thanks,
Doug

library(rJava)
.jinit()
.jcall("java/lang/System", "S", "getProperty", "java.runtime.version")
[1] "1.8.0_252-b09"
BiocManager::install("aoles/RBioFormats")
Bioconductor version 3.15 (BiocManager 1.30.16), R Under development (unstable)
(2022-02-17 r81751)
Installing github package(s) 'aoles/RBioFormats'
Error: Failed to install 'unknown package' from GitHub:
Line starting 'Roxyg ...' is malformed!

Install failure on Windows

Ran into an issue with installation of RBIoFormats on Windows (R 3.6.2).

The installation buggs out if both i386 and x64 versions of R are installed. Think it might be related to something like this issue.

Works fine after I uninstall R and select x64-only on reinstall.

Fails when downloads.openmicroscopy.org is down

The package shouldn't depend on an active internet connection, at least not without properly informing users, and definitely should not rely on a single server which today failed and renders RBioFormats unusable and by extension any R script using it.
EDIT: I see that the java library used to be bundled so I think reverting that change would be the solution.

Memory usage RBioformats vs FIJI/bioformats

Hi, Andrzej!

I have a new issue and I am not sure if it occurred because of a more recent version of bioformats. In short, opening the same file on ImageJ/Fiji (bioformats 6.1) uses 2.12GB of RAM, while read.image in R occupies 22.73GB (bioformats 6.0.0)! Is there a way to go back to an earlier version of RBioFormats to see if this a new issue?

Many thanks,
Geo

Using subset to open images in a list one at a time

Hello!

I am using the RBioFormats package to open .lif files, each of which contains multiple images and opens into a Large AnnotatedImageList.

I am having difficulty with some files due to their size, so would like to open each image from the .lif in turn and process them separately in a loop. Previously I have used the subset argument of read.image() to do this for video files by iterating through t, but this doesn't seem to be possible for opening multiple images in an archive.

Is there a way that I can do this?

Thanks,
Daniel

RBioFormats library needs internet connection to load

Hello,

I was using RBioFormats without any problems until I noticed that I could not load RBioFormats library when my computer is offline.

I get the error message (in RStudio):

library(RBioFormats)
Error: package or namespace load failed for ‘RBioFormats’:
.onLoad failed in loadNamespace() for 'RBioFormats', details:
call: NULL
error: failed to download Bio-Formats Java library.
Check your internet connection and try again.
In addition: Warning message:
In file(con, "r") :
InternetOpenUrl failed: 'The server name or address could not be resolved'

I am running Windows

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18362)

I installed RBioformats (on August 2020) doing
devtools::install_github("aoles/RBioFormats", INSTALL_opts=c("--no-multiarch"))

and it works normally when I am connected to Internet.

I don't really know what to do, but from what I read here, I thought that perhaps I needed to set a classpath to the bioformats_package.jar for rJava. So I wrote (RStudio):

a<-.libPaths()
ab<-paste0(a,'/RBioFormats/Java')
.jaddClassPath(ab)
.jclassPath()
[1] "C:\Program Files\R\R-4.0.2\library\rJava\java"
[2] "C:\Program Files\Portugal Identity Card"
[3] "C:\Program Files\R\R-4.0.2\library\RBioFormats\Java"

However, this didn't work at all, since I get the same error when I am offline.

I can confirm that now the bioformats_package.jar is in the rJava classpath

.jclassPath()
[1] "C:\Program Files\R\R-4.0.2\library\rJava\java"
[2] "C:\Program Files\Portugal Identity Card"
[3] "C:\Program Files\R\R-4.0.2\library\RBioFormats\Java"

And that the bioformats_package.jar is on the 'ab' folder

ab
[1] "C:/Program Files/R/R-4.0.2/library/RBioFormats/Java"
setwd(ab)
list.files()
[1] "bioformats_package.jar" "RBioFormats.jar"

Still, it doesn't work. I don't really understand what is happening, but I need to be able to load the library without Internet connection. I googled it and I know that other people have (or have had) the same problem, but I cannot find any solution. Could you please help?

Thank you.

Teresa

Hi~Need some help with RBioFormats installation problem~

Dear Andrzej Oleś

I tried to install RBioFormats by running "devtools::install_github("aoles/RBioFormats")", however, it failed with this error:
Makevars.win:1: *** missing separator. Stop.
Warning: running command 'make -f "Makevars.win" -f "E:/Software/R-321.0/etc/x64/Makeconf" -f "E:/Software/R-321.0/share/make/winshlib.mk" SHLIB="RBioFormats.dll" WIN=64 TCLBIN=64 OBJECTS="dummy.o"' had status 2
ERROR: compilation failed for package 'RBioFormats'
sessionInfo():
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

What could be the cause? Many thanks in advance!

Sincerely
Fred

Installation stuck at step "testing if installed package can be loaded from temporary location"

Hi,
I tried to install RBioFormats on R4.3.0:

BiocManager::install("aoles/RBioFormats")

── R CMD build ─────────────────────────────────────────────────────────────────

  • checking for file ‘/tmp/9771460.1.SC1.q/RtmptHlfNa/remotes5b886ec82ce9/aoles-RBioFormats-5ec5fad/DESCRIPTION’ ... OK

  • preparing ‘RBioFormats’:

  • checking DESCRIPTION meta-information ... OK

  • checking for LF line-endings in source and make files and shell scripts

  • checking for empty or unneeded directories

  • building ‘RBioFormats_0.99.14.tar.gz’

  • installing source package ‘RBioFormats’ ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location

and the installation stuck at this step. How could I solve this? Thanks in advance.

Error reading cellomics image

Hi aoles,

My code

options( java.parameters = "-Xmx4g" )
library("RBioFormats")
require(EBImage)
f = "./EBImage/RAHOTEP_150209150001_A01f00d0.C01"
img = read.image(file = f)

I use your package and i ve got an error when i try to read cellomics image. At beginning it works perfectly but now i can't read cellomics image and i 've got this message :
Erreur dans .jcall(reader, , "setOutputOrder", "XYCZT") :
java.lang.IllegalArgumentException: Invalid series: 0

Can you help me ?

Thanks,

Installation in R 4.0.0

Hi! I have a problem installing this package. I run the lines

install.packages("devtools")
devtools::install_github("aoles/RBioFormats")

And this return on the console:

``

  • installing source package 'RBioFormats' ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    converting help for package 'RBioFormats'
    finding HTML links ... done
    AnnotatedImage-class html
    finding level-2 HTML links ... done

    AnnotatedImageList-class html
    BioFormats.version html
    FormatTools html
    ImageMetadata-class html
    RBioFormats html
    checkJavaMemory html
    dimorder html
    metadata html
    metadataAccessors html
    mockFile html
    read.image html
    read.metadata html
    read.omexml html
    seriesCount html
    write.image html
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded from temporary location
    *** arch - i386
    Error: package or namespace load failed for 'rJava':
    .onLoad failed in loadNamespace() for 'rJava', details:
    call: fun(libname, pkgname)
    error: JAVA_HOME cannot be determined from the Registry
    Error : package 'rJava' could not be loaded
    Error: loading failed
    Ejecución interrumpida
    *** arch - x64
    probando la URL 'https://downloads.openmicroscopy.org/bio-formats/6.1.0/artifacts/bioformats_package.jar'
    Content type 'application/x-java-archive' length 37460318 bytes (35.7 MB)
    ==================================================
    downloaded 35.7 MB

ERROR: loading failed for 'i386'

  • removing 'C:/Users/nlazc/Documents/R/win-library/4.0/RBioFormats'
    Error: Failed to install 'RBioFormats' from GitHub:
    (convertido del aviso) installation of package ‘C:/Users/nlazc/AppData/Local/Temp/Rtmpae1dAM/file30d44d084413/RBioFormats_0.0.56.tar.gz’ had non-zero exit status
    ``

Installation under Windows

Hi, Andrzej!

I am stuck while trying to install Rbioformats in Windows 10. Rtools and devtools are installed, packages can be compile from source. rJava compiled fine and loads properly. However, when running I get

biocLite("aoles/RBioFormats")

I get the following output:

BioC_mirror: https://bioconductor.org
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.5.1 (2018-07-02).
Installing github package(s) ‘aoles/RBioFormats’
Downloading GitHub repo aoles/RBioFormats@master
Installing package into ‘C:/Users/Geo/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)

  • installing source package 'RBioFormats' ...
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    ** help
    *** installing help indices
    converting help for package 'RBioFormats'
    finding HTML links ... done
    AnnotatedImage-class html
    finding level-2 HTML links ... done

    AnnotatedImageList-class html
    BioFormats.version html
    FormatTools html
    ImageMetadata-class html
    RBioFormats html
    checkJavaMemory html
    dimorder html
    metadata html
    metadataAccessors html
    mockFile html
    read.image html
    read.metadata html
    read.omexml html
    seriesCount html
    write.image html
    ** building package indices
    ** installing vignettes
    ** testing if installed package can be loaded
    trying URL 'https://downloads.openmicroscopy.org/bio-formats/5.9.1/artifacts/bioformats_package.jar'
    Content type 'application/x-java-archive' length 31779356 bytes (30.3 MB)
    ==================================================
    downloaded 30.3 MB

Error: package or namespace load failed for 'RBioFormats':
.onLoad failed in loadNamespace() for 'RBioFormats', details:
call: .jfield("loci/formats/FormatTools", "S", "VERSION")
error: cannot find class loci/formats/FormatTools
Error: loading failed
Execution halted
ERROR: loading failed

  • removing 'C:/Users/Geo/Documents/R/win-library/3.5/RBioFormats'
    In R CMD INSTALL
    Warning message:
    In i.p(...) :
    installation of package ‘C:/Users/Geo/AppData/Local/Temp/RtmpU7bsbM/remotes13fc5a4431eb/aoles-RBioFormats-9d104f6’ had non-zero exit status

Do you have an idea what might go wrong?

Many thanks in advance,

Geo

From: "Andrzej K. Oleś" [email protected]
Reply-To: aoles/RBioFormats [email protected]
Date: Sunday, May 13, 2018 at 1:03 PM
To: aoles/RBioFormats [email protected]
Cc: Geo Vogler [email protected], State change [email protected]
Subject: Re: [aoles/RBioFormats] meta data is different between ImageJ and RBioformats (#11)

Hi Geo,

thank you for reaching out and for reporting the disappointing performance of read.metadata. I will look int this, I've opened a dedicated issue#12 in order to better keep track of it.

Best,
Andrzej


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub#11 (comment), or mute the threadhttps://github.com/notifications/unsubscribe-auth/AaGUenMsW-xwAM96YwOFxAUFg_aRCrKjks5tyJF3gaJpZM4Sppuu.

Originally posted by @GrauKatze in #11 (comment)

Windows installation fails due to missing path

Trying to install on a fresh Windows 11 machine, installation fails because the download destination for bioformats_package.jar doesn't exist.
The error is (see full output below):

cannot open destfile 'C:\Users\heriche\AppData\Local/R/cache/R/RBioFormats/bioformats_package.jar', reason 'No such file or directory'

and manually creating the path Local/R/cache/R/RBioFormats/ under 'C:\Users\heriche\AppData fixes the issue.

Would it be possible to automatically create the path if it doesn't exist? I am not familiar with Windows so I don't know if that makes sense or if there's another way of dealing with this.

> BiocManager::install("aoles/RBioFormats")

'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.1 (2022-06-23
  ucrt)
Installing github package(s) 'aoles/RBioFormats'
Downloading GitHub repo aoles/RBioFormats@HEAD
✔  checking for file 'C:\Users\heriche\AppData\Local\Temp\RtmpUPIRuq\remotes84c586d4b70\aoles-RBioFormats-2ed775a/DESCRIPTION' ... 
─  preparing 'RBioFormats':
✔  checking DESCRIPTION meta-information ... OK
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building 'RBioFormats_0.0.74.tar.gz'
   
* installing *source* package 'RBioFormats' ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning in utils::download.file(bf_url, bf_jar, mode = "wb", quiet = FALSE) :
  URL https://downloads.openmicroscopy.org/bio-formats/6.9.1/artifacts/bioformats_package.jar: cannot open destfile 'C:\Users\heriche\AppData\Local/R/cache/R/RBioFormats/bioformats_package.jar', reason 'No such file or directory'
Warning in utils::download.file(bf_url, bf_jar, mode = "wb", quiet = FALSE) :
  download had nonzero exit status
Error: package or namespace load failed for 'RBioFormats':
 .onLoad failed in loadNamespace() for 'RBioFormats', details:
  call: jclassName(class, class.loader = class.loader)
  error: java.lang.ClassNotFoundException
Error: loading failed
Execution halted
ERROR: loading failed
* removing 'C:/Program Files/R/R-4.2.1/library/RBioFormats'
Warning message:
In i.p(...) :
  installation of package ‘C:/Users/heriche/AppData/Local/Temp/RtmpUPIRuq/file84c54e079e6/RBioFormats_0.0.74.tar.gz’ had non-zero exit status

write.image does write "empty" image

Hi,

Thanks for developing that amazing package, which helps me a lot in my activity! Unfortunately, I have some problems when using the write.image function, that always returns an empty black image. It seems like imageData are not written. The code below illustrates my problem;when running:

library(EBImage)
library(RBioFormats)

IM=read.image('Images/MITORFP - MTG_I06_s1_w1.tif') #Metamorph tiff image
#--
write.image(IM,'EXP.tif')
IM2=read.image('EXP.tif')
#--
quantile(IM)
quantile(IM2)
unique(c(IM2))

It returns:

> quantile(IM)
         0%         25%         50%         75%        100% 
0.002090486 0.003875792 0.004150454 0.004425116 0.213351644 
> quantile(IM2)
  0%  25%  50%  75% 100% 
   0    0    0    0    0 
> unique(c(IM2))
[1] 0

I have tested several tiff (OME tiff) or png files, they all generate the same empty image (with the right dimensions and metadata however).

Is there any way to address this problem ?
Thanks for your great work !

Best,

Allan

Reading in TIFF stacks

I have a 4gb tiff video/stack. When I try to use read.image I end up with 20gb of RAM usage which are then interrupted by:

Error: cannot allocate vector of size 15.1 Gb

While the 15Gb might be a limitation that can be fixed somewhere else, why does a 4Gb file need 20Gb of memory?

Get number of frames in a TIFF video without reading into memory

Hello!

Firstly, many thanks for a very useful package.

I was wondering, is it possible to get the dimensions of a TIFF image without opening the whole file into memory? I am analysing a very long video file that will not fit into memory, using the subset function to open each frame at a time with a loop. Is there a way I can do this with RBioFormats?

Installation in R 3.6

For R 3.6, we adopted
BiocManager::install('RBioFormats')
for installation, but not successful.

meta data is different between ImageJ and RBioformats

Hi!

I am getting different results for CXD files imported with ImageJ vs RBioformats. A couple of fields (related to image scale) are all set to '1' in RBioformats, whereas the same file metadata in ImageJ is correctly identified (using Bioformats plugin, 5.8.1).

Any ideas? This is a great R library, and for an automated file analysis I really would need this feature. A sample file can be found here:

https://www.dropbox.com/s/5txk8b1rorzs7m8/Data1051.cxd?dl=0

Best,

Geo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.