[Insight-developers] UseCompression and ImageSeriesWriter

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 19 15:29:34 EDT 2007


Hi Gaetan,

There are probably better ways of verifying for compression...
but here is one that should do the trick:


You can use

      itksys::SystemTools::FileLength( filename )

to check for the size of the file.

You could write it first with filenameA using compression OFF,
then write it again with filenameB using compression ON, and
invoke the SystemTools method above for checking that both sizes,
are, let's say at least 80% apart.



    Luis




--------------------
Gaëtan Lehmann wrote:
> 
> Hi Luis,
> 
> I have made the changes and added the tests for the API. However, I  
> don't know how to test that the files produced are really compressed.  
> Is it possible to test that ?
> 
> Thanks,
> 
> Gaëtan
> 
> 
> Le 19 avr. 07 à 16:42, Luis Ibanez a écrit :
> 
>>
>> Hi Gaetan,
>>
>> It sounds reasonable to add this feature to the SeriesWriter.
>>
>> You may want to add it through a member variable, so that
>> if the ImageIO object is changed, then its compression state
>> is also set by the ImageSeriesWriter.
>>
>> If you add this feature, please make sure to add a test
>> of it too.
>>
>>
>>   Thanks
>>
>>
>>      Luis
>>
>>
>>
>> ---------------------
>> Gaëtan Lehmann wrote:
>>
>>> Hi,
>>> ImageFileWriter has a SetUseCompression() method, which allow us  to  
>>> compress the data - a very convenient feature :-)
>>> ImageSeriesWriter however doesn't have this nice feature.
>>> Can I add this feature to ImageSeriesWriter, or is it voluntary  
>>> done  that way ?
>>> Thanks,
>>> Gaëtan
>>> -- 
>>> Gaëtan Lehmann
>>> Biologie du Développement et de la Reproduction
>>> INRA de Jouy-en-Josas (France)
>>> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
>>> http://voxel.jouy.inra.fr
>>> --------------------------------------------------------------------- 
>>> ---
>>> _______________________________________________
>>> Insight-developers mailing list
>>> Insight-developers at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-developers
> 
> 
> -- 
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr
> 
> 
> 


More information about the Insight-developers mailing list