1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkImageCheckerboard.h
5 
6   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7   All rights reserved.
8   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10      This software is distributed WITHOUT ANY WARRANTY; without even
11      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12      PURPOSE.  See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /**
16  * @class   vtkImageCheckerboard
17  * @brief   show two images at once using a checkboard pattern
18  *
19  *  vtkImageCheckerboard displays two images as one using a checkerboard
20  *  pattern. This filter can be used to compare two images. The
21  *  checkerboard pattern is controlled by the NumberOfDivisions
22  *  ivar. This controls the number of checkerboard divisions in the whole
23  *  extent of the image.
24 */
25 
26 #ifndef vtkImageCheckerboard_h
27 #define vtkImageCheckerboard_h
28 
29 #include "vtkImagingGeneralModule.h" // For export macro
30 #include "vtkThreadedImageAlgorithm.h"
31 
32 
33 class VTKIMAGINGGENERAL_EXPORT vtkImageCheckerboard : public vtkThreadedImageAlgorithm
34 {
35 public:
36   static vtkImageCheckerboard *New();
37   vtkTypeMacro(vtkImageCheckerboard,vtkThreadedImageAlgorithm);
38   void PrintSelf(ostream& os, vtkIndent indent) override;
39 
40   //@{
41   /**
42    * Set/Get the number of divisions along each axis.
43    */
44   vtkSetVector3Macro(NumberOfDivisions,int);
45   vtkGetVectorMacro(NumberOfDivisions,int,3);
46   //@}
47 
48   /**
49    * Set the two inputs to this filter
50    */
SetInput1Data(vtkDataObject * in)51   virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); }
SetInput2Data(vtkDataObject * in)52   virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); }
53 
54 protected:
55   vtkImageCheckerboard();
~vtkImageCheckerboard()56   ~vtkImageCheckerboard() override {}
57 
58   void ThreadedRequestData(vtkInformation *request,
59                                    vtkInformationVector **inputVector,
60                                    vtkInformationVector *outputVector,
61                                    vtkImageData ***inData,
62                                    vtkImageData **outData,
63                                    int extent[6], int threadId) override;
64   int NumberOfDivisions[3];
65 private:
66   vtkImageCheckerboard(const vtkImageCheckerboard&) = delete;
67   void operator=(const vtkImageCheckerboard&) = delete;
68 };
69 
70 #endif
71 
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84