I did a high speed image streaming through a hamamatsu image acquisition software. The program automatically stacked all the images and save them onto a single file with an extension 'HIS'. HIS file can be opened with the LOCI bioformat importer with minor glitches, as my average filesize tends to be around 2GB or more (~2,000-4000 images per file). All I am trying to do is to split the all the images in the stack and save them all to either tif or Jpg format in a seperate folder.
The trouble is, I can't open them all at once as this would eat up all the virtual memory i have on the computer. I'm quite new to Fiji and not particularly familiar with JAVA syntaxes or ImageJ built-in macro functions. I went through a fair few descriptions of some of the functions as well as learning from some of the pre-written macros on the the LOCI official website http://www.loci.wisc.edu/bio-formats/imagej. There's an example file on there which sort of do a similar task called 'recursivetiffconvert'. The macro supposes to convert all DM3 files in a directory and then batch convert them to tiff format. I tried the code and pointed it to read HIS file instead of DM3. At first, it seems to be loading all the images in background under the 'setBatchmode command' (am I right to assume that?), as my hard disk just screamed upon an execution. However, in the end, it only saved either the last or the first frame of HIS stack into tiff. I went through the bioformat macro-extension to see if there is any sub-routines which i could call after 'run("Bio-Formats Macro Extensions");' to count the total number of files and then do the block conversion in the background. Embarrassingly I'm dead after the first few lines. Had a string of Java errors, it said that the conflict was caused by illegal/unsupported escape sequence I only know some programming in matlab. Could anyone please point me out to the right direction? This is my super basic code. Please go easy on the terminologies, I'm super new. Thanks very much. //Get directory for HIS images hisDir = getDirectory("Choose HIS images "); hisList = getFileList(hisDir); hisim = hisDir+hisList[0]; print(hisim); run("Bio-Formats Macro Extensions"); fileID = Ext.setId(hisim); setBatchMode(true); //somehow get the total number of images, create a loop and do block loading/coversion in the background. setBatchMode(false); |
This is a good scenario for trying out a 64 bit operating system.
________________________________________ From: ImageJ Interest Group [[hidden email]] On Behalf Of popilika [[hidden email]] Sent: Friday, March 25, 2011 11:21 To: [hidden email] Subject: LOCI Hamamatsu HIS file I did a high speed image streaming through a hamamatsu image acquisition software. The program automatically stacked all the images and save them onto a single file with an extension 'HIS'. HIS file can be opened with the LOCI bioformat importer with minor glitches, as my average filesize tends to be around 2GB or more (~2,000-4000 images per file). All I am trying to do is to split the all the images in the stack and save them all to either tif or Jpg format in a seperate folder. The trouble is, I can't open them all at once as this would eat up all the virtual memory i have on the computer. I'm quite new to Fiji and not particularly familiar with JAVA syntaxes or ImageJ built-in macro functions. I went through a fair few descriptions of some of the functions as well as learning from some of the pre-written macros on the the LOCI official website http://www.loci.wisc.edu/bio-formats/imagej. There's an example file on there which sort of do a similar task called 'recursivetiffconvert'. The macro supposes to convert all DM3 files in a directory and then batch convert them to tiff format. I tried the code and pointed it to read HIS file instead of DM3. At first, it seems to be loading all the images in background under the 'setBatchmode command' (am I right to assume that?), as my hard disk just screamed upon an execution. However, in the end, it only saved either the last or the first frame of HIS stack into tiff. I went through the bioformat macro-extension to see if there is any sub-routines which i could call after 'run("Bio-Formats Macro Extensions");' to count the total number of files and then do the block conversion in the background. Embarrassingly I'm dead after the first few lines. Had a string of Java errors, it said that the conflict was caused by illegal/unsupported escape sequence I only know some programming in matlab. Could anyone please point me out to the right direction? This is my super basic code. Please go easy on the terminologies, I'm super new. Thanks very much. //Get directory for HIS images hisDir = getDirectory("Choose HIS images "); hisList = getFileList(hisDir); hisim = hisDir+hisList[0]; print(hisim); run("Bio-Formats Macro Extensions"); fileID = Ext.setId(hisim); setBatchMode(true); //somehow get the total number of images, create a loop and do block loading/coversion in the background. setBatchMode(false); http://imagej.588099.n2.nabble.com/file/n6208708/Clipboard01.jpg -- View this message in context: http://imagej.588099.n2.nabble.com/LOCI-Hamamatsu-HIS-file-tp6208708p6208708.html Sent from the ImageJ mailing list archive at Nabble.com. |
In reply to this post by popilika
Hi,
> I did a high speed image streaming through a hamamatsu image acquisition > software. The program automatically stacked all the images and save them > onto a single file with an extension 'HIS'. HIS file can be opened with the > LOCI bioformat importer with minor glitches, as my average filesize tends to > be around 2GB or more (~2,000-4000 images per file). All I am trying to do > is to split the all the images in the stack and save them all to either tif > or Jpg format in a seperate folder. There is now a new sample macro on the Bio-Formats website which should do more or less what you want: http://trac.openmicroscopy.org.uk/ome/browser/bioformats.git/components/loci-plugins/utils/macros/batchTiffConvert.txt (It is linked from http://loci.wisc.edu/bio-formats/imagej.) By default, it will convert every file in the chosen directory to a set of TIFF files (one TIFF file per plane). Only one plane is opened at a time, so even very large datasets can be converted. You can easily modify the macro to convert to JPEG files by replacing ".tiff" with ".jpg" in lines 27 and 35. > Had a string of Java > errors, it said that the conflict was caused by illegal/unsupported escape > sequence I only know some programming in matlab. Updating to the latest trunk build of Bio-Formats should fix that error. Regards, -Melissa On Fri, Mar 25, 2011 at 11:21:52AM -0700, popilika wrote: > I did a high speed image streaming through a hamamatsu image acquisition > software. The program automatically stacked all the images and save them > onto a single file with an extension 'HIS'. HIS file can be opened with the > LOCI bioformat importer with minor glitches, as my average filesize tends to > be around 2GB or more (~2,000-4000 images per file). All I am trying to do > is to split the all the images in the stack and save them all to either tif > or Jpg format in a seperate folder. > > The trouble is, I can't open them all at once as this would eat up all the > virtual memory i have on the computer. I'm quite new to Fiji and not > particularly familiar with JAVA syntaxes or ImageJ built-in macro functions. > I went through a fair few descriptions of some of the functions as well as > learning from some of the pre-written macros on the the LOCI official > website http://www.loci.wisc.edu/bio-formats/imagej. There's an example file > on there which sort of do a similar task called 'recursivetiffconvert'. The > macro supposes to convert all DM3 files in a directory and then batch > convert them to tiff format. I tried the code and pointed it to read HIS > file instead of DM3. At first, it seems to be loading all the images in > background under the 'setBatchmode command' (am I right to assume that?), as > my hard disk just screamed upon an execution. However, in the end, it only > saved either the last or the first frame of HIS stack into tiff. I went > through the bioformat macro-extension to see if there is any sub-routines > which i could call after 'run("Bio-Formats Macro Extensions");' to count the > total number of files and then do the block conversion in the background. > Embarrassingly I'm dead after the first few lines. Had a string of Java > errors, it said that the conflict was caused by illegal/unsupported escape > sequence I only know some programming in matlab. Could anyone please point > me out to the right direction? This is my super basic code. Please go easy > on the terminologies, I'm super new. Thanks very much. > > //Get directory for HIS images > > hisDir = getDirectory("Choose HIS images "); > hisList = getFileList(hisDir); > hisim = hisDir+hisList[0]; > print(hisim); > > > run("Bio-Formats Macro Extensions"); > fileID = Ext.setId(hisim); > > setBatchMode(true); > > //somehow get the total number of images, create a loop and do block > loading/coversion in the background. > > setBatchMode(false); > > > > http://imagej.588099.n2.nabble.com/file/n6208708/Clipboard01.jpg > > -- > View this message in context: http://imagej.588099.n2.nabble.com/LOCI-Hamamatsu-HIS-file-tp6208708p6208708.html > Sent from the ImageJ mailing list archive at Nabble.com. |
Free forum by Nabble | Edit this page |