<html><head></head><body bgcolor="#FFFFFF"><div></div><p class="MsoNormal">Hi,</p><p class="MsoNormal">I asked this last week, but didn't get any response. I haven't been able to solve the problem so thought I'd try the list again.</p><p class="MsoNormal">I am trying to use the reslicing classes, based on the example in Examples\GUI\Qt\FourPaneViewer, although I am not using QT.</p><p class="MsoNormal">&nbsp;<span class="Apple-style-span">I have this code,</span></p><p class="MsoNormal"></p><p class="MsoNormal">vtkSmartPointer&lt;vtkImageData&gt; image;</p><p class="MsoNormal">// image creation code snipped</p><p class="MsoNormal">auto riw = vtkSmartPointer&lt;vtkResliceImageViewer&gt;::New();</p><p class="MsoNormal">riw-&gt;SetRenderWindow(render_window_-&gt;GetRenderWindow());</p><p class="MsoNormal">riw-&gt;SetupInteractor(vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New());</p><p class="MsoNormal">riw-&gt;SetResliceCursor(riw[0]-&gt;GetResliceCursor());</p><p class="MsoNormal">rep-&gt;GetResliceCursorActor()-&gt;GetCursorAlgorithm()-&gt;SetReslicePlaneNormal(i);</p><p class="MsoNormal">riw-&gt;SetInput(image);</p><p class="MsoNormal">riw-&gt;SetSliceOrientation(0);</p><p class="MsoNormal">riw-&gt;SetResliceModeToAxisAligned();</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">This fails on the penultimate line, the call to SetSliceOrientation(), and seems to be because I have set the Input directly and the library is expecting a pipeline algorithm.</p><p class="MsoNormal">Is this the case, and can anyone please suggest how to overcome this? Is there a pipeline algorithm to feed vtkImageData in a call to SetInputConnection() or is that the wrong route?</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">Here's my call stack; note the inPtr is NULL calling into vtkImageMapperConvertImageScalarsToRGBA() and beyond:</p><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">vtkRendering.dll!vtkImageMapperShiftScale&lt;double,double&gt;(const double * inPtr=0x00000000, ... Line 487&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageMapperConvertImageScalarsToRGBA(void * inPtr=0x00000000, ... Line 611&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageMapperMapColors(void * arg=0x28b16b9c) Line 787&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkCommon.dll!vtkMultiThreader::SingleMethodExecute() Line 292&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageMapper3D::MakeTextureData(vtkImageProperty * property=0x28b160c8, vtkImageData * input=0x28b1adb8, ... Line 949&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkOpenGLImageSliceMapper::RenderTexturedPolygon(...) Line 276&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkOpenGLImageSliceMapper::RecursiveRenderTexturedPolygon(...) Line 150&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkOpenGLImageSliceMapper::Render(...) Line 1089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageSlice::Render(...) Line 320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageSlice::RenderOpaqueGeometry(vtkViewport * viewport=0x28b1baf0) Line 275&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderer::UpdateGeometry() Line 630&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkOpenGLRenderer::DeviceRender() Line 247&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderer::Render() Line 345&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRendererCollection::Render() Line 51 C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderWindow::DoStereoRender() Line 726&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderWindow::DoFDRender() Line 692&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderWindow::DoAARender() Line 579&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkRenderWindow::Render() Line 392&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageViewer2::Render() Line 688&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkWidgets.dll!vtkResliceImageViewer::Render() Line 420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++</p><p class="MsoNormal">vtkRendering.dll!vtkImageViewer2::SetSliceOrientation(int orientation=0) Line 301 C++</p><p class="MsoNormal"><span class="Apple-style-span">[myapp]</span></p><br>Thanks<div>-- Craig</div><div><br></div></body></html>