Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 60f1dc962abad0f3b492991a4fbef9be > files > 4728

vtk-doc-5.4.2-5mdv2010.0.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>VTK: dox/Imaging/vtkImageMathematics.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="classes.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>dox/Imaging/vtkImageMathematics.h</h1><a href="a02936.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*=========================================================================</span>
<a name="l00002"></a>00002 <span class="comment"></span>
<a name="l00003"></a>00003 <span class="comment">  Program:   Visualization Toolkit</span>
<a name="l00004"></a>00004 <span class="comment">  Module:    $RCSfile: vtkImageMathematics.h,v $</span>
<a name="l00005"></a>00005 <span class="comment"></span>
<a name="l00006"></a>00006 <span class="comment">  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen</span>
<a name="l00007"></a>00007 <span class="comment">  All rights reserved.</span>
<a name="l00008"></a>00008 <span class="comment">  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.</span>
<a name="l00009"></a>00009 <span class="comment"></span>
<a name="l00010"></a>00010 <span class="comment">     This software is distributed WITHOUT ANY WARRANTY; without even</span>
<a name="l00011"></a>00011 <span class="comment">     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR</span>
<a name="l00012"></a>00012 <span class="comment">     PURPOSE.  See the above copyright notice for more information.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">=========================================================================*/</span>
<a name="l00027"></a>00027 <span class="preprocessor">#ifndef __vtkImageMathematics_h</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define __vtkImageMathematics_h</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="comment">// Operation options.</span>
<a name="l00032"></a><a class="code" href="a02936.html#a9716c9cb27fdfd65572bfd94d180bde">00032</a> <span class="preprocessor">#define VTK_ADD                0</span>
<a name="l00033"></a><a class="code" href="a02936.html#4e7b6588f919ce241dc28cedd83a174b">00033</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SUBTRACT           1</span>
<a name="l00034"></a><a class="code" href="a02936.html#76a4decf55a3f9122e629a9893c50933">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_MULTIPLY           2</span>
<a name="l00035"></a><a class="code" href="a02936.html#fcc68034680e52ab9066c3f3ab3ee0a6">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_DIVIDE             3</span>
<a name="l00036"></a><a class="code" href="a02936.html#47a4e007a5cd1745c564dc1d20fc146a">00036</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_INVERT             4</span>
<a name="l00037"></a><a class="code" href="a02936.html#89b95775b10a98ac78b0552a08e2886e">00037</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SIN                5</span>
<a name="l00038"></a><a class="code" href="a02936.html#9bcdba9571227c3b35072623351d48df">00038</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_COS                6</span>
<a name="l00039"></a><a class="code" href="a02936.html#5e4cb1973385d74601a6e11249baacda">00039</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_EXP                7</span>
<a name="l00040"></a><a class="code" href="a02936.html#0dff22ab5454e4f82d9d544d7ed7541e">00040</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_LOG                8</span>
<a name="l00041"></a><a class="code" href="a02936.html#8dea00de6abc2ae80ee901a03b87726e">00041</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ABS                9</span>
<a name="l00042"></a><a class="code" href="a02936.html#bd98688e7e44e93e74eee67506fa1ceb">00042</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SQR               10</span>
<a name="l00043"></a><a class="code" href="a02936.html#04c226f147054646c36b107e47adecec">00043</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_SQRT              11</span>
<a name="l00044"></a><a class="code" href="a02936.html#6ce2086708e63a909c1351664f5799c1">00044</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_MIN               12</span>
<a name="l00045"></a><a class="code" href="a02936.html#e793105f54b048182c846be4b35c3559">00045</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_MAX               13</span>
<a name="l00046"></a><a class="code" href="a02936.html#1f5f782d485c9db01c342e2d82749d84">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ATAN              14</span>
<a name="l00047"></a><a class="code" href="a02936.html#32134f234586b472c0bfdc9fa9df30ed">00047</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ATAN2             15</span>
<a name="l00048"></a><a class="code" href="a02936.html#0cc09683b31d6f530004c443a2c229bc">00048</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_MULTIPLYBYK       16</span>
<a name="l00049"></a><a class="code" href="a02936.html#edddb60688b08b0fc40f5b23393b4ea7">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_ADDC              17</span>
<a name="l00050"></a><a class="code" href="a02936.html#f9877af4f10f5b07b52878ecb8f7cbd5">00050</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_CONJUGATE         18</span>
<a name="l00051"></a><a class="code" href="a02936.html#7de17261db6e8789ba328110bab7c0db">00051</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_COMPLEX_MULTIPLY  19</span>
<a name="l00052"></a><a class="code" href="a02936.html#e7cfd106371f88aadf43b43dcc9efba7">00052</a> <span class="preprocessor"></span><span class="preprocessor">#define VTK_REPLACECBYK       20</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054 <span class="preprocessor">#include "<a class="code" href="a02384.html">vtkThreadedImageAlgorithm.h</a>"</span>
<a name="l00055"></a>00055 
<a name="l00056"></a><a class="code" href="a00798.html">00056</a> <span class="keyword">class </span><a class="code" href="a02170.html#3e7fe2912c56d9dbe95c57272a61f15f">VTK_IMAGING_EXPORT</a> <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a> : <span class="keyword">public</span> <a class="code" href="a01705.html" title="Generic filter that has one input..">vtkThreadedImageAlgorithm</a>
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058 <span class="keyword">public</span>:
<a name="l00059"></a>00059   <span class="keyword">static</span> <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a> *<a class="code" href="a00101.html#06d80d8d4aa1a4856135fa003845be82">New</a>();
<a name="l00060"></a><a class="code" href="a00798.html#a0284c7e6820a17f2eed688f979587ff">00060</a>   vtkTypeRevisionMacro(<a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>,<a class="code" href="a01705.html" title="Generic filter that has one input..">vtkThreadedImageAlgorithm</a>);
<a name="l00061"></a>00061   <span class="keywordtype">void</span> <a class="code" href="a01705.html#53dc14a03ab6cffae0ca5cadb2c6d172">PrintSelf</a>(ostream&amp; os, <a class="code" href="a00869.html" title="a simple class to control print indentation">vtkIndent</a> indent);
<a name="l00062"></a>00062 
<a name="l00064"></a>00064 
<a name="l00065"></a>00065   vtkSetMacro(Operation,<span class="keywordtype">int</span>);
<a name="l00066"></a>00066   vtkGetMacro(Operation,<span class="keywordtype">int</span>);
<a name="l00067"></a><a class="code" href="a00798.html#9efbf481cda9bbddeb2fbf75851a0bea">00067</a>   <span class="keywordtype">void</span> SetOperationToAdd() {this-&gt;SetOperation(<a class="code" href="a02936.html#a9716c9cb27fdfd65572bfd94d180bde">VTK_ADD</a>);};
<a name="l00068"></a><a class="code" href="a00798.html#9443ac3b08eda2ca5b52ab9e8b86dae6">00068</a>   <span class="keywordtype">void</span> SetOperationToSubtract() {this-&gt;SetOperation(<a class="code" href="a02936.html#4e7b6588f919ce241dc28cedd83a174b">VTK_SUBTRACT</a>);};
<a name="l00069"></a><a class="code" href="a00798.html#093200cf48f57887811896a1e39a85d7">00069</a>   <span class="keywordtype">void</span> SetOperationToMultiply() {this-&gt;SetOperation(<a class="code" href="a02936.html#76a4decf55a3f9122e629a9893c50933">VTK_MULTIPLY</a>);};
<a name="l00070"></a><a class="code" href="a00798.html#7d5b5f5f38d7df7fa734b71879d80604">00070</a>   <span class="keywordtype">void</span> SetOperationToDivide() {this-&gt;SetOperation(<a class="code" href="a02936.html#fcc68034680e52ab9066c3f3ab3ee0a6">VTK_DIVIDE</a>);};
<a name="l00071"></a><a class="code" href="a00798.html#49e9b86d4847165e9065825d606e7fb2">00071</a>   <span class="keywordtype">void</span> SetOperationToConjugate() {this-&gt;SetOperation(<a class="code" href="a02936.html#f9877af4f10f5b07b52878ecb8f7cbd5">VTK_CONJUGATE</a>);};
<a name="l00072"></a><a class="code" href="a00798.html#30e8868e97dca1fe0fd4c2895e3433ac">00072</a>   <span class="keywordtype">void</span> SetOperationToComplexMultiply()
<a name="l00073"></a>00073     {this-&gt;SetOperation(<a class="code" href="a02936.html#7de17261db6e8789ba328110bab7c0db">VTK_COMPLEX_MULTIPLY</a>);};
<a name="l00075"></a>00075 
<a name="l00076"></a><a class="code" href="a00798.html#f762f1cca21e0bb0a3657f2448c9d224">00076</a>   <span class="keywordtype">void</span> SetOperationToInvert() {this-&gt;SetOperation(<a class="code" href="a02936.html#47a4e007a5cd1745c564dc1d20fc146a">VTK_INVERT</a>);};
<a name="l00077"></a><a class="code" href="a00798.html#b93337797a3c1aa1d312be62ced9d943">00077</a>   <span class="keywordtype">void</span> SetOperationToSin() {this-&gt;SetOperation(<a class="code" href="a02936.html#89b95775b10a98ac78b0552a08e2886e">VTK_SIN</a>);};
<a name="l00078"></a><a class="code" href="a00798.html#fbf678ad44ae3cbd0d5b6aaeda674ccb">00078</a>   <span class="keywordtype">void</span> SetOperationToCos() {this-&gt;SetOperation(<a class="code" href="a02936.html#9bcdba9571227c3b35072623351d48df">VTK_COS</a>);};
<a name="l00079"></a><a class="code" href="a00798.html#846e7b98245e8b17322ecd081c0eb57d">00079</a>   <span class="keywordtype">void</span> SetOperationToExp() {this-&gt;SetOperation(<a class="code" href="a02936.html#5e4cb1973385d74601a6e11249baacda">VTK_EXP</a>);};
<a name="l00080"></a><a class="code" href="a00798.html#94b84e02216fcfd8e7d512fffff9e6bd">00080</a>   <span class="keywordtype">void</span> SetOperationToLog() {this-&gt;SetOperation(<a class="code" href="a02936.html#0dff22ab5454e4f82d9d544d7ed7541e">VTK_LOG</a>);};
<a name="l00081"></a><a class="code" href="a00798.html#d511b14d04a6727029032f9f0fe5c5b7">00081</a>   <span class="keywordtype">void</span> SetOperationToAbsoluteValue() {this-&gt;SetOperation(<a class="code" href="a02936.html#8dea00de6abc2ae80ee901a03b87726e">VTK_ABS</a>);};
<a name="l00082"></a><a class="code" href="a00798.html#e4a244a2a5b82aacc558f540ebe9d1cd">00082</a>   <span class="keywordtype">void</span> SetOperationToSquare() {this-&gt;SetOperation(<a class="code" href="a02936.html#bd98688e7e44e93e74eee67506fa1ceb">VTK_SQR</a>);};
<a name="l00083"></a><a class="code" href="a00798.html#542325c58a81bc081afe05323c6f2161">00083</a>   <span class="keywordtype">void</span> SetOperationToSquareRoot() {this-&gt;SetOperation(<a class="code" href="a02936.html#04c226f147054646c36b107e47adecec">VTK_SQRT</a>);};
<a name="l00084"></a><a class="code" href="a00798.html#55c31a51d5ecec0c2fd8bebb8723ae26">00084</a>   <span class="keywordtype">void</span> SetOperationToMin() {this-&gt;SetOperation(<a class="code" href="a02936.html#6ce2086708e63a909c1351664f5799c1">VTK_MIN</a>);};
<a name="l00085"></a><a class="code" href="a00798.html#9cf1ae83cdf4191135afcadb8c316c00">00085</a>   <span class="keywordtype">void</span> SetOperationToMax() {this-&gt;SetOperation(<a class="code" href="a02936.html#e793105f54b048182c846be4b35c3559">VTK_MAX</a>);};
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="a00798.html#1229d6f618968a9769215d7346b4b43d">00087</a>   <span class="keywordtype">void</span> SetOperationToATAN() {this-&gt;SetOperation(<a class="code" href="a02936.html#1f5f782d485c9db01c342e2d82749d84">VTK_ATAN</a>);};
<a name="l00088"></a><a class="code" href="a00798.html#dbf583b4cfee7cbe783f9e382c1fc76d">00088</a>   <span class="keywordtype">void</span> SetOperationToATAN2() {this-&gt;SetOperation(<a class="code" href="a02936.html#32134f234586b472c0bfdc9fa9df30ed">VTK_ATAN2</a>);};
<a name="l00089"></a><a class="code" href="a00798.html#4da7bcd1f9fc814de4bcb5a7709d8a45">00089</a>   <span class="keywordtype">void</span> SetOperationToMultiplyByK() {this-&gt;SetOperation(<a class="code" href="a02936.html#0cc09683b31d6f530004c443a2c229bc">VTK_MULTIPLYBYK</a>);};
<a name="l00090"></a><a class="code" href="a00798.html#c24e95ca2d4b7331eb23cd3654655b37">00090</a>   <span class="keywordtype">void</span> SetOperationToAddConstant() {this-&gt;SetOperation(<a class="code" href="a02936.html#edddb60688b08b0fc40f5b23393b4ea7">VTK_ADDC</a>);};
<a name="l00091"></a><a class="code" href="a00798.html#af34e4cfb6fa9df1ab52131be243b08a">00091</a>   <span class="keywordtype">void</span> SetOperationToReplaceCByK() {this-&gt;SetOperation(<a class="code" href="a02936.html#e7cfd106371f88aadf43b43dcc9efba7">VTK_REPLACECBYK</a>);};
<a name="l00092"></a>00092   vtkSetMacro(ConstantK,<span class="keywordtype">double</span>);
<a name="l00093"></a>00093   vtkGetMacro(ConstantK,<span class="keywordtype">double</span>);
<a name="l00094"></a>00094   vtkSetMacro(ConstantC,<span class="keywordtype">double</span>);
<a name="l00095"></a>00095   vtkGetMacro(ConstantC,<span class="keywordtype">double</span>);
<a name="l00096"></a>00096 
<a name="l00097"></a>00097   <span class="comment">// How to handle divide by zero</span>
<a name="l00098"></a>00098   vtkSetMacro(DivideByZeroToC,<span class="keywordtype">int</span>);
<a name="l00099"></a>00099   vtkGetMacro(DivideByZeroToC,<span class="keywordtype">int</span>);
<a name="l00100"></a>00100   vtkBooleanMacro(DivideByZeroToC,<span class="keywordtype">int</span>);
<a name="l00101"></a>00101 
<a name="l00103"></a>00103 
<a name="l00104"></a><a class="code" href="a00798.html#98c75a331a959bb732e9a0b223d59af1">00104</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput1(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *in) { this-&gt;<a class="code" href="a00727.html#29e467d314fb2efafb134cc11a8796a5">SetInput</a>(0,in); }
<a name="l00105"></a><a class="code" href="a00798.html#966d0e5298784ba3a66f147387f80cf0">00105</a>   <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetInput2(<a class="code" href="a00362.html" title="general representation of visualization data">vtkDataObject</a> *in) { this-&gt;<a class="code" href="a00727.html#29e467d314fb2efafb134cc11a8796a5">SetInput</a>(1,in); }
<a name="l00107"></a>00107 
<a name="l00108"></a>00108 <span class="keyword">protected</span>:
<a name="l00109"></a>00109   <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>();
<a name="l00110"></a><a class="code" href="a00798.html#f7ecc017c7bab20f269efebd92a84999">00110</a>   ~<a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>() {};
<a name="l00111"></a>00111 
<a name="l00112"></a>00112   <span class="keywordtype">int</span> Operation;
<a name="l00113"></a><a class="code" href="a00798.html#a937fbc73a72e1f92f88a67ea4ef5be6">00113</a>   <span class="keywordtype">double</span> ConstantK;
<a name="l00114"></a><a class="code" href="a00798.html#aa77fda0cd0d6bb9d09a4e4a8ab29bed">00114</a>   <span class="keywordtype">double</span> ConstantC;
<a name="l00115"></a><a class="code" href="a00798.html#736c0a722b9976ebd71ee6f62797b661">00115</a>   <span class="keywordtype">int</span> DivideByZeroToC;
<a name="l00116"></a>00116 
<a name="l00117"></a>00117   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00727.html#b739abd84881f7e31a8a382bf5a06a91">RequestInformation</a> (<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *,
<a name="l00118"></a>00118                                   <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **,
<a name="l00119"></a>00119                                   <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *);
<a name="l00120"></a>00120 
<a name="l00121"></a>00121   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="a01705.html#dda52b8ad4b703ee11c76b916accbb42">ThreadedRequestData</a>(<a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a> *request,
<a name="l00122"></a>00122                                    <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> **inputVector,
<a name="l00123"></a>00123                                    <a class="code" href="a00895.html" title="Store zero or more vtkInformation instances.">vtkInformationVector</a> *outputVector,
<a name="l00124"></a>00124                                    <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> ***inData,
<a name="l00125"></a>00125                                    <a class="code" href="a00751.html" title="topologically and geometrically regular array of data">vtkImageData</a> **outData,
<a name="l00126"></a>00126                                    <span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21083c65ff97d39562e6981dc3e2041b09f">extent</a>[6], <span class="keywordtype">int</span> threadId);
<a name="l00127"></a>00127 
<a name="l00128"></a>00128   <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="a00727.html#7abefdbb585c2e27ebc314c894c87f74">FillInputPortInformation</a>(<span class="keywordtype">int</span> <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d210710cb6d12e418b21e8fb3d79ac32f51c">port</a>, <a class="code" href="a00872.html" title="Store vtkAlgorithm input/output information.">vtkInformation</a>* <a class="code" href="a03761.html#c6551f7bf833e8254b2b3ecdaea0d21023da246d4a744e861548382bb79fad81">info</a>);
<a name="l00129"></a>00129 
<a name="l00130"></a>00130 <span class="keyword">private</span>:
<a name="l00131"></a>00131   <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>(<span class="keyword">const</span> <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00132"></a>00132   <span class="keywordtype">void</span> operator=(<span class="keyword">const</span> <a class="code" href="a00798.html" title="Add, subtract, multiply, divide, invert, sin, cos, exp, log.">vtkImageMathematics</a>&amp;);  <span class="comment">// Not implemented.</span>
<a name="l00133"></a>00133 };
<a name="l00134"></a>00134 
<a name="l00135"></a>00135 <span class="preprocessor">#endif</span>
<a name="l00136"></a>00136 <span class="preprocessor"></span>
<a name="l00137"></a>00137 
<a name="l00138"></a>00138 
<a name="l00139"></a>00139 
<a name="l00140"></a>00140 
<a name="l00141"></a>00141 
<a name="l00142"></a>00142 
<a name="l00143"></a>00143 
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 
<a name="l00146"></a>00146 
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 3 18:35:35 2009 for VTK by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>