<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">When receiving a camera frame I’m converting to vtkImageData like this:</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(112, 61, 170);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class="">
</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(112, 61, 170);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    </span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">auto</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">
 imageImport = </span>vtkSmartPointer<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><</span>vtkImageImport<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">>::</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">New</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">();</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">SetDataSpacing</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">1.0f</span>,
<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
1.0f</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
1.0f</span>);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">SetDataOrigin</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.f</span>,
<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
0.f</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
0.f</span>);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">SetWholeExtent</span>(<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">0.f</span>,
 videoFrame.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">width</span> -
<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
1.f</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
0.f</span>, videoFrame.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">height</span> -
<span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
1.f</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
0.f</span>, <span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">
0.f</span>);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    imageImport-></span>SetDataExtentToWholeExtent<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">();</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    imageImport-></span>SetDataScalarTypeToUnsignedChar<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">();</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(61, 29, 129);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">    imageImport-></span>SetNumberOfScalarComponents<span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #272ad8" class="">4</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">);</span></div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">SetImportVoidPointer</span>(videoFrame.<span style="font-variant-ligatures: no-common-ligatures; color: #4f8187" class="">rawPixelData</span>);</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">Update</span>();</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;" class="">
<br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">    <span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">
vtkSmartPointer</span><<span style="font-variant-ligatures: no-common-ligatures; color: #703daa" class="">vtkImageData</span>> imageData = imageImport-><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">GetOutput</span>();</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">It works, but adding this to an image plane the image is mirrored across the Y-axis (right-left). Am I doing this image conversion correctly?</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">cameron</div>
</body>
</html>