Hi all,<br><br>First and foremost, please excuse any errors in my post as I'm fairly new to VTK. Here is my situation:<br><br>I have a 3d surface rendering of brain using the marching cubes algorithm. I want to color a spatially localized region of the cortical surface based on EEG activity. This would essentially look like a "heatmap" of electrode activity within the region that electrodes were implanted.<br>
<br>Let's assume I have already mapped EEG values at a specific point in time to color (let's say it is an 8-bit colormap). Thus I have, say, a 6x6 grid of color values. I also have the 3d coordinates for each of the 36 electrodes in the 6x6 grid. These electrode coordinates are co-registered to the surface rendering of the brain. <br>
<br>This is where I'm confused, how do I map the 6x6 heatmap on to the cortical surface rendering based on the electrode coordinates? I assume I have to take marching cube output and set TCoords with a vtkfloatarray containing 3d tuples for each electrode coordinate. Then I have to point the actor containing the marching cube to a texture object that is based on the heatmap using SetTexture(). <br>
<br>I did a test run using this idea, but got odd results. I created a 1x8 bitmap image and colored each pixel a different color. I then specified 8 3d tuples corresponding to locations for 8 electrodes in a vtkfloatarray. When I set the texture to the vtktexture object mapped to the bitmap image the whole cortical surface ended up taking just one of the colors from my bitmap and used it to color the entire surface rendering. I should also note that I turned off the repeat property of the vtktexture object.<br>
<br>I hope somebody familiar with what I'm trying to accomplish can help me out.<br><br>Best regards,<br>Ankit<br><br><br>