SIVIC API  0.9.26
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
svkImageMathematics.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2009-2014 The Regents of the University of California.
3  * All Rights Reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * • Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  * • Redistributions in binary form must reproduce the above copyright notice,
10  * this list of conditions and the following disclaimer in the documentation
11  * and/or other materials provided with the distribution.
12  * • None of the names of any campus of the University of California, the name
13  * "The Regents of the University of California," or the names of any of its
14  * contributors may be used to endorse or promote products derived from this
15  * software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
26  * OF SUCH DAMAGE.
27  */
28 
29 
30 
31 /*
32  * $URL$
33  * $Rev$
34  * $Author$
35  * $Date$
36  *
37  * Authors:
38  * Jason C. Crane, Ph.D.
39  * Beck Olson
40  */
41 
42 
43 #ifndef SVK_IMAGE_MATHEMATICS_H
44 #define SVK_IMAGE_MATHEMATICS_H
45 
46 
47 #include <vtkImageMathematics.h>
48 #include <svkAlgorithmPortMapper.h>
49 #include <svkStatistics.h>
50 
51 
52 namespace svk {
53 
54 
55 using namespace std;
56 
57 
65 class svkImageMathematics : public vtkImageMathematics
66 {
67 
68  public:
69  static svkImageMathematics* New();
70 
71  typedef enum {
72  INPUT_IMAGE_1 = 0,
75  ADD,
86  OUTPUT_TYPE
87  } svkImageMathematicsParameters;
88 
89  typedef enum {
90  UNDEFINED = 0,
91  UNSIGNED_INT_2 = 1,
93  } svkImageMathematicsOutputType;
94 
96  void SetInputPortsFromXML( );
97 
99  svkAlgorithmPortMapper* GetPortMapper();
100 
101 
102  vtkTypeMacro( svkImageMathematics, vtkImageMathematics);
103  virtual void Update();
104 
106  void PrintSelf( ostream &os, vtkIndent indent );
107 
108  // Explicitly specify float output
109  void SetOutputType(int outputType);
110  svkInt* GetOutputType();
111 
112  protected:
113 
116 
117  virtual int FillOutputPortInformation( int vtkNotUsed(port), vtkInformation* info );
118  virtual int FillInputPortInformation( int vtkNotUsed(port), vtkInformation* info );
119 
122 
123  private:
124  void SetDatatypes();
125 
126 
127 };
128 
129 
130 } //svk
131 
132 
133 #endif //SVK_IMAGE_MATHEMATICS_H
134 
Definition: svkImageMathematics.h:65
Definition: svkImageMathematics.h:75
svkAlgorithmPortMapper * portMapper
The port mapper used to set the input port parameters.
Definition: svkImageMathematics.h:121
Definition: svkImageMathematics.h:85
Definition: svkImageMathematics.h:82
Definition: svkImageMathematics.h:77
Definition: svkImageMathematics.h:92
Definition: svkImageMathematics.h:78
Definition: svkImageMathematics.h:80
Definition: svkImageMathematics.h:73
Definition: svkImageMathematics.h:83
Definition: svkImageMathematics.h:81
Definition: svkImageMathematics.h:84
Definition: svkAlgorithmPortMapper.h:99
Definition: svkInt.h:59
Definition: svkImageMathematics.h:74
Definition: svkImageMathematics.h:76