<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Dear VTK Community,</p>
<p><br>
</p>
<p></p>
<p style="margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
I'm trying to run several computer vision algorithms on a serie of video frames. But because these algorithms result in some very strange output I figured there might be something wrong with my video frames. So to check if the frames are correct I want to visualize
them with VTK. VTK doesn't support the Mat type so I convert the Mat(the video frames) to vtkImageData, but vtkImageData is just shown as a white rectangle.</p>
<p style="margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
I get the video frames by converting infrared frames to an openCV Mat type like this.</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-size: 13px; width: auto; max-height: 600px; overflow: auto; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: rgb(57, 51, 24); word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> openni</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">Grayscale16Pixel</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> imgBuf </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">openni</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">Grayscale16Pixel</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">irFrame</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">getData</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">int</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> w </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> irFrame</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">getWidth</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">int</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> h </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> irFrame</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">getHeight</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
cv</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">Mat</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> frameOne</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">h</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> w</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> CV_16U</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> imgBuf</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
frameOne</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">convertTo</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">frameOne</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> CV_8U</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">);</span></code></pre>
<p style="margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
I then try to convert the Mat to vtkImageData like this.</p>
<pre class="lang-cpp prettyprint prettyprinted" style="margin-top: 0px; margin-bottom: 1em; padding: 5px; border: 0px; font-size: 13px; width: auto; max-height: 600px; overflow: auto; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; color: rgb(57, 51, 24); word-wrap: normal; background-color: rgb(238, 238, 238);"><code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif; white-space: inherit;"><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">vtkSmartPointer</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);"><vtkImageData></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> convertMatToVtkImageData</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">const</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">Mat</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">&</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
vtkSmartPointer</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);"><vtkImageData></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> output </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> vtkSmartPointer</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);"><vtkImageData></span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">New</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
vtkSmartPointer</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);"><vtkInformation></span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> outInfo </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> vtkSmartPointer</span><span class="str" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);"><vtkInformation></span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">::</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">New</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">-></span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">SetDimensions</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">cols</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">rows</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);">1</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">-></span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">AllocateScalars</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">VTK_UNSIGNED_CHAR</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">,</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">channels</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">());</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> dptr </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">reinterpret_cast</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"><</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*>(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">-></span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">GetScalarPointer</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">());</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">size_t</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> elem_step </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">-></span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">GetIncrements</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">()[</span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);">1</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">]/</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">sizeof</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">for</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">int</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> y </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);">0</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> y </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"><</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">rows</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">++</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">y</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">{</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> drow </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> dptr </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">+</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> elem_step </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> y</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">const</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">srow </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">ptr</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"><</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">unsigned</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">char</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">>(</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">y</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">);</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">for</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">(</span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">int</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> x </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="lit" style="margin: 0px; padding: 0px; border: 0px; color: rgb(107, 41, 27);">0</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> x </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"><</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> source</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">.</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">cols</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">++</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">x</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">)</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
drow</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">[</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">x</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">]</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">=</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> </span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">*</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">srow</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">++;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">}</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">-></span><span class="typ" style="margin: 0px; padding: 0px; border: 0px; color: rgb(43, 145, 175);">Modified</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">();</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="kwd" style="margin: 0px; padding: 0px; border: 0px; color: rgb(0, 0, 139);">return</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);"> output</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">;</span><span class="pln" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">
</span><span class="pun" style="margin: 0px; padding: 0px; border: 0px; color: rgb(46, 49, 51);">}</span></code></pre>
<p style="margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
Is there something wrong with my code or am I trying to do something that is not possible?</p>
<p style="margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
Some extra info:</p>
<ul style="margin: 0px 0px 1em 30px; padding: 0px; border: 0px; font-size: 15px; color: rgb(34, 36, 38); font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; line-height: 19.5px;">
<li style="margin: 0px 0px 0.5em; padding: 0px; border: 0px; word-wrap: break-word;">
I use Android and do most of the programming in C++ (NDK)</li><li style="margin: 0px; padding: 0px; border: 0px; word-wrap: break-word;">I make use of the Structure Sensor's IR sensor to get the video frames</li><li style="margin: 0px; padding: 0px; border: 0px; word-wrap: break-word;">I cannot use the vtkImageImporter</li></ul>
<br>
<p></p>
</div>
</body>
</html>