<div dir="ltr">Thanks Bill for your prompt reply.<br><div>I'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"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></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'll investigate.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Fri, Dec 20, 2013 at 10:35 AM, Fethallah <<a href="mailto:fethallah@gmail.com">fethallah@gmail.com</a>> wrote:<br>
> Hi there,<br>
><br>
> I would like to compress some relatively large tif files.<br>
><br>
> My code looks like:<br>
> =================<br>
> ReaderType::Pointer reader = ReaderType::New();<br>
> reader->SetFileName( argv[1] );<br>
> reader->Update();<br>
><br>
> WriterType::Pointer writer = WriterType::New();<br>
> writer->SetInput( reader->GetOutput() );<br>
> writer->SetFileName( argv[2] );<br>
> writer->SetUseCompression(true);<br>
> typedef  itk::TIFFImageIO TIFFIOType;<br>
> TIFFIOType::Pointer tiffIO = TIFFIOType::New();<br>
> tiffIO->SetCompressionToJPEG();<br>
> writer->SetImageIO(tiffIO);<br>
> writer->Update();<br>
> =================<br>
> when I run<br>
> binary.exe Image.tif ImageCompressed.tif<br>
><br>
> I'm getting the following exception:<br>
> JPEGLib: Bogus input colorspace.<br>
> itk::ExceptionObject (000000000012F6E8)<br>
> Location: "unknown"<br>
> File:<br>
> ..\..\..\..\..\src\InsightToolkit-4.4.2\Modules\IO\TIFF\src\itkTIFFImageIO.cxx<br>
> Line: 1946<br>
> Description: itk::ERROR: TIFFImageIO(00000000020D4420): TIFFImageIO: error<br>
> out of disk space<br>
><br>
><br>
> The pixel type of the input images is UCHAR.<br>
><br>
> An other question regarding JPG compression in TIF files, assuming this<br>
> works with ITK.<br>
> Is there a way to control the compression rate ?<br>
><br>
> Thanks into advance for your help.<br>
><br>
><br>
> --<br>
> Fethallah<br>
><br>
><br>
><br>
><br>
> --<br>
> 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>

> Sent from the ITK Insight Users mailing list archive at Nabble.com.<br>
> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <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>