Dear list,<div><br></div><div>I'm trying to connect my image reading code to ctkVTKSliceView's setImageData slot. At run time when the code tries to perform the connection, </div><div>the following error message appears in the console: Object::connect: No such slot ctkVTKSliceView::setImageData((vtkImageData*))</div>
<div><br></div><div>My code looks like this:</div><div><br></div><div><div><br></div><div><div><font face="courier new, monospace">class ThreadedLoadImage : public QObject</font></div><div><font face="courier new, monospace">{</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>Q_OBJECT</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>public: </font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>signals:</font></div><div><font face="courier new, monospace"> <b> void imageLoaded(vtkImageData*);<span class="Apple-tab-span" style="white-space:pre"> </span></b></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>public slots:</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>bool loadImage(const QString&);</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>protected:</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>double progress;<span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span></font></div>
<div><font face="courier new, monospace">};</font></div></div><div><br></div><div>The signal is launched once the image is loaded succesfully</div><div><font face="courier new, monospace">(...)</font></div><div><div><font face="courier new, monospace">imageReader->SetFileName(a_fileName.toLatin1());</font></div>
<div><font face="courier new, monospace">imageReader->Update();</font></div><div><font face="courier new, monospace">vtkSmartPointer<vtkImageData> image = imageReader->GetOutput();</font></div><div><font face="courier new, monospace">if (!image) {</font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>std::cerr << "Unsuccessfully read: " << qPrintable(a_fileName) << std::endl;<span class="Apple-tab-span" style="white-space:pre"> </span></font></div>
<div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>return EXIT_FAILURE;</font></div><div><font face="courier new, monospace">} else {</font></div><div><font face="courier new, monospace"><span class="Apple-tab-span" style="white-space:pre"> </span>std::cout << "Successfully read: " << qPrintable(a_fileName) << std::endl;<span class="Apple-tab-span" style="white-space:pre"> </span></font></div>
<div><font face="courier new, monospace">}</font></div><div><font face="courier new, monospace">emit imageLoaded(image);</font></div></div><div><font face="courier new, monospace">(...)</font></div><div><br></div><div><br>
</div><div>ThreadedLoadImage* loader = new ThreadedLoadImage();</div><div>(...)</div><div>ctkVTKSliceView* sliceView = new ctkVTKSliceView();</div><div>QObject::connect(loader,SIGNAL(imageLoaded(vtkImageData*)),sliceView, SLOT(setImageData((vtkImageData*))));</div>
</div><div><br></div><div>I've read that this might be caused by wrong moc files in the build path, but it seems that my moc file</div><div>(C:\work\bin\CTK\VC9-W32-Release\CTK-build\Libs\Visualization\VTK\Widgets\moc_ctkVTKSliceView.cxx ) is correct (although my understandings of moc files is null), </div>
<div>and I've moved it tho the first position in Visual Studio include paths to no avail.</div><div><br></div><div>Any more hints about this lost slot in ctkVTKSliceView?</div><div><div><br></div><div>Thanks in advance</div>
-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>