[vtkusers] File compression using vtkZlibCompressor
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Jun 9 13:20:28 EDT 2004
Henry,
Did you try the vtkXML*Writer family ? They use compression by default.
Typical use is:
package require vtk
package require vtkinteraction
package require vtktesting
vtkVolume16Reader v16
v16 SetDataDimensions 64 64
[v16 GetOutput] SetOrigin 0.0 0.0 0.0
v16 SetDataByteOrderToLittleEndian
v16 SetFilePrefix "$VTK_DATA_ROOT/Data/headsq/quarter"
v16 SetImageRange 1 93
v16 SetDataSpacing 3.2 3.2 1.5
v16 Update
vtkXMLImageDataWriter writer
writer SetInput [v16 GetOutput]
writer SetFileName compress.vtk
writer Write
HTH
Mathieu
Henry J. Karpf wrote:
> I have files that are fairly large and it takes a while to read them.
> When i resave them using compression they open much quiker. Is there a
> way that i can avoid this process of writing my files, opening them adn
> then resaving them. Like how do i write out automatically to a
> compressed file? Any examples would be great. Also when compressed how
> do you calculate the offsets in the appended data? Thanks.
>
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list