]> Creatis software - clitk.git/blob - vv/vvAnimatedGIFWriter.h
Add clitkImage2DicomSeries tool to write a Dicom Series from an image without a corre...
[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 vvAnimatedGIFWriter : public vtkGenericMovieWriter //test this if link error...
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   // Description:
36   // Set/Get the dithering
37   vtkSetMacro(Dither, bool);
38   vtkGetMacro(Dither, bool);
39
40 protected:
41   vvAnimatedGIFWriter();
42   ~vvAnimatedGIFWriter();
43
44   int Rate;
45   int Loops;
46   bool Dither;
47
48   vtkSmartPointer<vtkImageAppend> RGBvolume;
49   std::vector< vtkSmartPointer<vtkImageData> > RGBslices;
50
51 private:
52   vvAnimatedGIFWriter(const vvAnimatedGIFWriter&); // Not implemented
53   void operator=(const vvAnimatedGIFWriter&); // Not implemented
54 };
55
56 #endif