Hi vtk community, <br><br>I can't seem to remember how the data is represented in vtkImageData. I have a 720x720x1 3 component RGB image being represented by vtkImageData. I am using imageData->GetScalarPointer() to access the data. I have another image 480x640x1 3 component RGB that I want to place in the middle of the new image. Here is the code I have but its not lining up correctly. Any ideas?<br>
<br><br>thanks,<br><br>John<br><br><br> ptr = (unsigned char*)imageData->GetScalarPointer();<br> unsigned char *ptr2 = (unsigned char*)origData->GetScalarPointer();<br><br> <br> for(int i = 0; i < 720; i++)<br>
{<br> for(int j = 0; j < 720; j++)<br> {<br> if(i <600 && i > 119 && j <680 && j > 39)<br> {<br> *ptr = *ptr2;<br>
*ptr++;<br> *ptr = *ptr2;<br> *ptr++;<br> *ptr = *ptr2;<br> *ptr++;<br> <br> <br> }<br> else<br>
{ <br> *ptr++;<br> *ptr++;<br> *ptr++;<br> <br><br> }<br><br> <br><br> }<br>}<br>