/usr/include/paraview/vtkSquirtCompressor.h is in paraview-dev 5.0.1+dfsg1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkSquirtCompressor.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*----------------------------------------------------------------------------
Copyright (c) Sandia Corporation
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
----------------------------------------------------------------------------*/
// .NAME vtkSquirtCompressor - Image compressor/decompressor using SQUIRT.
// .SECTION Description
// This class compresses Image data using SQUIRT a Run-Length-Encoded
// compression scheme. The Squirt Level controls the compression. 0 is
// lossless compression, 1 through 5 are lossy compression levels with
// 5 being maximum compression.
//
// Squirt produces smaller compression ratio than some other popular
// compression algorithm. However, Squirt has a relatively high
// throughput compared to some other compression algorithm. Squirt's
// performance is optimized for RGBa images, however the class can
// also work with RGB images. There is no performance hit when applying
// the lossy comrpession levels.
//
// Levels 1 through 5 apply a color reducing mask to the run computation,
// not to the pixel directly. This is clever in that no new colors are
// introduced to the image, and as a result one doesn't see drastic changes
// between the reduced color image and the original. However, when using
// the higher levels one may get runs that produce visual artifiacts. For
// example when a run starts in one actor whose reduced color matches the
// background the background is colored with the actor color.
//
// The compressor uses a modified SQUIRT implementation where encode 4-bit
// opacity information as well. This is needed to improve background color
// blending for translucent renderings in ParaView.
// .SECTION Thanks
// Thanks to Sandia National Laboratories for this compression technique
#ifndef vtkSquirtCompressor_h
#define vtkSquirtCompressor_h
#include "vtkImageCompressor.h"
#include "vtkPVVTKExtensionsRenderingModule.h" // needed for export macro
class vtkMultiProcessStream;
class VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkSquirtCompressor : public vtkImageCompressor
{
public:
static vtkSquirtCompressor* New();
vtkTypeMacro(vtkSquirtCompressor, vtkImageCompressor);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set Squirt compression level.
// Level 0 is lossless compression, 1 through 5 are lossy compression
// levels with 5 being maximum compression.
vtkSetClampMacro(SquirtLevel, int, 0, 5);
vtkGetMacro(SquirtLevel, int);
// Description:
// Compress/Decompress data array on the objects input with results
// in the objects output. See also Set/GetInput/Output.
virtual int Compress();
virtual int Decompress();
//BTX
// Description:
// Serialize/Restore compressor configuration (but not the data) into the stream.
virtual void SaveConfiguration(vtkMultiProcessStream *stream);
virtual bool RestoreConfiguration(vtkMultiProcessStream *stream);
//ETX
virtual const char *SaveConfiguration();
virtual const char *RestoreConfiguration(const char *stream);
protected:
vtkSquirtCompressor();
virtual ~vtkSquirtCompressor();
int DecompressRGB();
int DecompressRGBA();
int SquirtLevel;
private:
vtkSquirtCompressor(const vtkSquirtCompressor&); // Not implemented.
void operator=(const vtkSquirtCompressor&); // Not implemented.
};
#endif
|