]> Creatis software - clitk.git/blob - vv/vvAnimatedGIFWriter.h
Red and blue were swapped (different order between VTK and CxImage)
[clitk.git] / vv / vvAnimatedGIFWriter.h
1 #ifndef __vvAnimatedGIFWriter_h
2 #define __vvAnimatedGIFWriter_h
3
4 #include <vector>
5
6 #include <vtkGenericMovieWriter.h>
7 #include <vtkSmartPointer.h>
8
9 class vtkImageAppend;
10
11 class VTK_IO_EXPORT vvAnimatedGIFWriter : public vtkGenericMovieWriter
12 {
13 public:
14   static vvAnimatedGIFWriter *New();
15   vtkTypeMacro(vvAnimatedGIFWriter,vtkGenericMovieWriter);
16   void PrintSelf(ostream& os, vtkIndent indent);
17
18   // Description:
19   // These methods start writing an Movie file, write a frame to the file
20   // and then end the writing process.
21   void Start();
22   void Write();
23   void End();
24
25   // Description:
26   // Set/Get the frame rate, in frame/s.
27   vtkSetClampMacro(Rate, int, 1, 5000);
28   vtkGetMacro(Rate, int);
29
30   // Description:
31   // Set/Get the number of loops,  0 means infinite
32   vtkSetClampMacro(Loops, int, 0, 5000);
33   vtkGetMacro(Loops, int);
34
35 protected:
36   vvAnimatedGIFWriter();
37   ~vvAnimatedGIFWriter();
38
39   int Rate;
40   int Loops;
41
42   vtkSmartPointer<vtkImageAppend> RGBvolume;
43   std::vector< vtkSmartPointer<vtkImageData> > RGBslices;
44
45 private:
46   vvAnimatedGIFWriter(const vvAnimatedGIFWriter&); // Not implemented
47   void operator=(const vvAnimatedGIFWriter&); // Not implemented
48 };
49
50 #endif