Thanks Julien,<div><br></div><div>That was an easy one, Now it works. </div><div>Too bad I did not catch it before bothering into the list.</div><div><br></div><div>Thanks<br><br><div class="gmail_quote">On Tue, Oct 30, 2012 at 1:52 PM, Julien Finet <span dir="ltr"><<a href="mailto:julien.finet@kitware.com" target="_blank">julien.finet@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Sergio,<div>It seems that you have 1 pair of parenthesis too many in your SLOT signature:<br><div>SLOT(setImageData(vtkImageData*))</div>
<div>instead of </div><div>SLOT(setImageData((vtkImageData*)))</div><div>Hth,</div>
<div>Julien.</div><div><br><div class="gmail_quote"><div><div class="h5">On Tue, Oct 30, 2012 at 7:45 AM, Sergio Vera <span dir="ltr"><<a href="mailto:sergio.vera@alma3d.com" target="_blank">sergio.vera@alma3d.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">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 style="white-space:pre-wrap"> </span>Q_OBJECT</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>public: </font></div>
<div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>signals:</font></div><div><font face="courier new, monospace"> <b> void imageLoaded(vtkImageData*);<span style="white-space:pre-wrap"> </span></b></font></div>
<div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>public slots:</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>bool loadImage(const QString&);</font></div>
<div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>protected:</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>double progress;<span style="white-space:pre-wrap"> </span><span style="white-space:pre-wrap"> </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 style="white-space:pre-wrap"> </span>std::cerr << "Unsuccessfully read: " << qPrintable(a_fileName) << std::endl;<span style="white-space:pre-wrap"> </span></font></div>
<div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>return EXIT_FAILURE;</font></div><div><font face="courier new, monospace">} else {</font></div><div><font face="courier new, monospace"><span style="white-space:pre-wrap"> </span>std::cout << "Successfully read: " << qPrintable(a_fileName) << std::endl;<span style="white-space:pre-wrap"> </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>
<span><font color="#888888">
-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. <a href="tel:%28%2B34%29%20932%20380%20592" value="+34932380592" target="_blank">(+34) 932 380 592</a><br> <a href="http://www.alma3d.com" target="_blank">www.alma3d.com</a><br>
</font></span></div>
<br></div></div>_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@commontk.org" target="_blank">Ctk-developers@commontk.org</a><br>
<a href="http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/ctk-developers</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></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>