<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Hi Again Gary 
<div><br>
</div>
<div>Good to know that you’ve found a solution. However,  I find it puzzling that the files are different sizes.</div>
<div>We had a problem where bio-formats was writing multiple copies of the xml when called from Matlab.</div>
<div>The work-around was to add the following line:</div>
<div><br>
</div>
<div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);">java.lang.System.setProperty(</span>'javax.xml.transform.TransformerFactory'<span style="color: rgb(0, 0, 0);">, </span>'com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl’<span style="color: rgb(0, 0, 0);">);</span></div>
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);">to the Matlab code as in the example that I sent.</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);">Perhaps this might help.</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);">Regards</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(39, 42, 216);">
<span style="color: rgb(0, 0, 0);">Ian </span></div>
<div><span style="color: rgb(0, 0, 0);"><br>
</span></div>
<div>
<div>On 27 Oct 2014, at 12:43, Yellen, Gary <<a href="mailto:gary_yellen@hms.harvard.edu">gary_yellen@hms.harvard.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div class="WordSection1" style="page: WordSection1;">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);">I was able to solve both the OME-TIFF export speed problem and the ModuloAlongT problem by using a hybrid approach:  using the LOCI tools to create the OME-XML metadata, but then using the MATLAB Tiff() class for the actual
 OME-TIFF writing.  I tried this because of information on the forums that the MicroManager saving of OME-TIFFs was faster than the Bio-formats code.<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);"> </span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);">I’ve enclosed the MATLAB code that I used for this hybrid approach, in case anyone is interested.  The first section is a little parochial (using our local data objects), but most of the code should be re-usable.   This
 code wrote a medium-sized set of data in 1.3 seconds, compared with 89 seconds for using only calls to LOCI for the writing; although both cases had BigTiff and LZW compression set, the file using the hybrid approach was also about ~3x smaller for some reason
 (1.7 GB vs 5.3 GB; the 1.7 GB is essentially the same size as the MATLAB .mat file version of the same data).  Both versions of the file are readable using the Bio-Formats importer in Fiji.<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);"> </span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);">I have used simpler metadata notations for the TiffData entries; they just include the starting IFD number and the number of planes.<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);"> </span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);">This also solved the problem with the ModuloAlongT SA metadata (which apparently became corrupted during or after the writer.saveBytes calls).<o:p></o:p></span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);"> </span></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;">
<span style="color: rgb(31, 73, 125);">gary<o:p></o:p></span></div>
</div>
<span><dF_saveAsOMETiff.m></span>_______________________________________________<br>
ome-devel mailing list<br>
<a href="mailto:ome-devel@lists.openmicroscopy.org.uk" style="color: purple; text-decoration: underline;">ome-devel@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel" style="color: purple; text-decoration: underline;">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel</a></div>
</blockquote>
</div>
<br>
</body>
</html>