<div dir="ltr"><div>Thanks for the reply! I'm using VTK 5.6. There doesn't seem be a GetMapper() method in vtkImageActor. There is a BorderOn() option in vtkImageReslice, however. But it doesn't help.<br><br></div>
RP<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 31, 2013 at 1:48 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">When you feed a 128x128x2 image into vtkImageActor, it displays it<br>
with a size of 127x127x1. It cuts off the outer half of every edge<br>
pixel.<br>
<br>
Try calling actor->GetMapper()->BorderOn() to see if this fixes the<br>
problem.<br>
<span class="HOEnZb"><font color="#888888"><br>
- David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, May 31, 2013 at 11:10 AM, TrackVis Admin <<a href="mailto:trackvis@gmail.com">trackvis@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I've been trying to use vtkImageReslice to display a 3D image volume as<br>
> image slice. Here is what I did:<br>
><br>
> vtkImageReslice* reslice = vtkImageReslice::New();<br>
> reslice->SetInput( image_data );<br>
> reslice->BorderOn();<br>
> reslice->AutoCropOutputOn();<br>
><br>
> // This sets us to extract slices.<br>
> reslice->SetOutputDimensionality( 2 );<br>
><br>
> // This will change depending what orienation we're in.<br>
> reslice->SetResliceAxesDirectionCosines( 1, 0, 0,<br>
> 0, 1, 0,<br>
> 0, 0, 1 );<br>
><br>
> // Image to colors using color table.<br>
> vtkImageMapToColors* colormap = vtkImageMapToColors::New();<br>
> colormap->SetLookupTable( some_lookup_table );<br>
> colormap->SetInputConnection( reslice->GetOutputPort() );<br>
><br>
> vtkImageActor* actor = vtkImageActor::New();<br>
> actor->SetInput( colormap->GetOutput() );<br>
><br>
> Everything appears to be fine until I applied it on a single slice volume.<br>
> For example, if the input volume has dimension of 128x128x1. I would expect<br>
> it show a thin line on X or Y plane with dimension of 128x1. However, I see<br>
> nothing! If I use a volume of 128x128x2, I only see 1 line of pixels on X or<br>
> Y plane, where I expect to see 2 lines (128 x 2). Did I do anything wrong?<br>
> Why does it look like that 1 slice of the data is missing?<br>
><br>
> Thank you!<br>
> RP<br>
</div></div></blockquote></div><br></div>