<div dir="ltr">Thanks Bill for your prompt reply.<br><div>I&#39;m looking forward to hearing from you.</div><div><br></div><div>--</div><div>Fethallah</div></div><div class="gmail_extra"><br clear="all"><div><div>--</div>Fethallah <br>
</div>
<br><br><div class="gmail_quote">On Fri, Dec 20, 2013 at 4:50 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I do not see any tests that use tiff compression. You may have founds<br>
a bug. I&#39;ll investigate.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Dec 20, 2013 at 10:35 AM, Fethallah &lt;<a href="mailto:fethallah@gmail.com">fethallah@gmail.com</a>&gt; wrote:<br>
&gt; Hi there,<br>
&gt;<br>
&gt; I would like to compress some relatively large tif files.<br>
&gt;<br>
&gt; My code looks like:<br>
&gt; =================<br>
&gt; ReaderType::Pointer reader = ReaderType::New();<br>
&gt; reader-&gt;SetFileName( argv[1] );<br>
&gt; reader-&gt;Update();<br>
&gt;<br>
&gt; WriterType::Pointer writer = WriterType::New();<br>
&gt; writer-&gt;SetInput( reader-&gt;GetOutput() );<br>
&gt; writer-&gt;SetFileName( argv[2] );<br>
&gt; writer-&gt;SetUseCompression(true);<br>
&gt; typedef  itk::TIFFImageIO TIFFIOType;<br>
&gt; TIFFIOType::Pointer tiffIO = TIFFIOType::New();<br>
&gt; tiffIO-&gt;SetCompressionToJPEG();<br>
&gt; writer-&gt;SetImageIO(tiffIO);<br>
&gt; writer-&gt;Update();<br>
&gt; =================<br>
&gt; when I run<br>
&gt; binary.exe Image.tif ImageCompressed.tif<br>
&gt;<br>
&gt; I&#39;m getting the following exception:<br>
&gt; JPEGLib: Bogus input colorspace.<br>
&gt; itk::ExceptionObject (000000000012F6E8)<br>
&gt; Location: &quot;unknown&quot;<br>
&gt; File:<br>
&gt; ..\..\..\..\..\src\InsightToolkit-4.4.2\Modules\IO\TIFF\src\itkTIFFImageIO.cxx<br>
&gt; Line: 1946<br>
&gt; Description: itk::ERROR: TIFFImageIO(00000000020D4420): TIFFImageIO: error<br>
&gt; out of disk space<br>
&gt;<br>
&gt;<br>
&gt; The pixel type of the input images is UCHAR.<br>
&gt;<br>
&gt; An other question regarding JPG compression in TIF files, assuming this<br>
&gt; works with ITK.<br>
&gt; Is there a way to control the compression rate ?<br>
&gt;<br>
&gt; Thanks into advance for your help.<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Fethallah<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Compressing-Tif-files-tp7584685.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/Compressing-Tif-files-tp7584685.html</a><br>

&gt; Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br></div>