<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I am still quite new to VTK and am trying to use the reslicing classes, based on the example in Examples\GUI\Qt\FourPaneViewer, although I am not using QT.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I have this code, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkSmartPointer&lt;vtkImageData&gt; image;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>// image creation code snipped<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>auto riw = vtkSmartPointer&lt;vtkResliceImageViewer&gt;::New();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetRenderWindow(render_window_-&gt;GetRenderWindow());<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetupInteractor(vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New());<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetResliceCursor(riw[0]-&gt;GetResliceCursor());<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>rep-&gt;GetResliceCursorActor()-&gt;GetCursorAlgorithm()-&gt;SetReslicePlaneNormal(i);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetInput(image);&nbsp;&nbsp;&nbsp;&nbsp; //<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetSliceOrientation(0);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>riw-&gt;SetResliceModeToAxisAligned();<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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. Is this the case, and can you 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?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Here's my call stack; note the inPtr is NULL calling into vtkImageMapperConvertImageScalarsToRGBA() and beyond:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageMapperShiftScale&lt;double,double&gt;(const double * inPtr=0x00000000, ... Line 487&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageMapperConvertImageScalarsToRGBA(void * inPtr=0x00000000, ... Line 611&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageMapperMapColors(void * arg=0x28b16b9c) Line 787&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkCommon.dll!vtkMultiThreader::SingleMethodExecute() Line 292&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageMapper3D::MakeTextureData(vtkImageProperty * property=0x28b160c8, vtkImageData * input=0x28b1adb8, ... Line 949&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkOpenGLImageSliceMapper::RenderTexturedPolygon(...) Line 276&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkOpenGLImageSliceMapper::RecursiveRenderTexturedPolygon(...) Line 150&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkOpenGLImageSliceMapper::Render(...) Line 1089&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageSlice::Render(...) Line 320&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageSlice::RenderOpaqueGeometry(vtkViewport * viewport=0x28b1baf0) Line 275&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderer::UpdateGeometry() Line 630&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkOpenGLRenderer::DeviceRender() Line 247&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderer::Render() Line 345&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRendererCollection::Render() Line 51 C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderWindow::DoStereoRender() Line 726&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderWindow::DoFDRender() Line 692&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderWindow::DoAARender() Line 579&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkRenderWindow::Render() Line 392&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageViewer2::Render() Line 688&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkWidgets.dll!vtkResliceImageViewer::Render() Line 420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>vtkRendering.dll!vtkImageViewer2::SetSliceOrientation(int orientation=0) Line 301 C++<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>[myapp]<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Many thanks<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>-- Craig<o:p></o:p></span></p></div></body></html>