Hello everyone. <br><br>I have been slowly getting the hang of QT and ITK, After a few days I successfully was able to compile and run the QTITK example located at <a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/QtITK/?root=InsightApplications">http://public.kitware.com/cgi-bin/viewcvs.cgi/QtITK/?root=InsightApplications</a><br>
<br>The small app loads and image and shows colors depending of the progress it takes when going through a filter. Also it displays a progress bar. I am using &#39;curvatureflowimagefilter&#39; to test the connections. <br>
<br>I now would like to use a slider to set the SetNumberofIterations int variable of the filter from the GUI. Unfortunately I get the message below. <br><br>I believe I am close as I was able to start the filter using the QTSlider - sliderMoved function to trigger the file reading and filtering by calling the Update function. <br>
<br>Any suggestions would be handy. Full code is attached and code snippet is below. <br><br>Thank you<br><br>Sergio <br><br><br>  QWidget qb;<br>  qb.resize(620,200);<br><br>  const int buttonHeight =  30;<br>  const int buttonWidth  = 100;<br>
  const int buttonSpace  = 100;<br><br>  int horizontalPosition =  60;<br><br>  QPushButton  bb( &quot;Start&quot;, &amp;qb );<br>  bb.setGeometry( horizontalPosition, 20, buttonWidth, buttonHeight );<br><br>  horizontalPosition += buttonWidth + buttonSpace;<br>
<br>  QtLightIndicator  cc( &amp;qb, &quot;State&quot; );<br>  cc.setGeometry( horizontalPosition, 20, buttonWidth, buttonHeight );<br>  cc.Modified();<br><br>  horizontalPosition += buttonWidth + buttonSpace;<br><br>  QPushButton  qt( &quot;Quit&quot;, &amp;qb );<br>
  qt.setGeometry( horizontalPosition, 20, buttonWidth, buttonHeight );<br><br>  QtProgressBar qs( &amp;qb, &quot;Progress&quot;);<br>  qs.setGeometry( 10, 60, 600, 30 );<br>  <br>  QSlider sl(Qt::Horizontal, &amp;qb);<br>
  sl.setRange(1, 100);<br>  sl.setValue(10);<br>  sl.setGeometry(100, 110, 400, 60);<br><br>  // Connect the progress bar to the ITK processObject<br>  qs.Observe( filter.GetPointer() );<br>  qs.Observe( reader.GetPointer() );<br>
<br><br>  typedef QtSlotAdaptor&lt;FilterType&gt; SlotAdaptorType;<br>  SlotAdaptorType slotAdaptor1;<br>  // Connect the adaptor to a method of the ITK filter<br>  slotAdaptor1.SetCallbackFunction( filter, &amp; FilterType::Update );<br>
  // Connect the adaptor&#39;s Slot to the Qt Widget Signal<br>  QObject::connect( &amp;bb, SIGNAL(clicked()), &amp;slotAdaptor1, SLOT(Slot()) );<br><br>  typedef QtSlotAdaptor&lt;FilterType&gt; SlotAdaptorType;<br>  SlotAdaptorType slotAdaptor2;<br>
  // Connect the adaptor to a method of the ITK filter<br>  slotAdaptor2.SetCallbackFunction( filter, &amp; FilterType::SetNumberOfIterations );<br>  // Connect the adaptor&#39;s Slot to the Qt Widget Signal<br>  QObject::connect( &amp;sl, SIGNAL(sliderMoved(int)), &amp;slotAdaptor2, SLOT(Slot()) );<br>
<br><br>********************* COMPILE OUTPUT *********************************************<br><br>linux-vk5n:/home/echopixel/<div id=":11k" class="ii gt">Desktop/engine/code/epx01 # make<br>[ 25%] Building CXX object CMakeFiles/epx01.dir/epx.cxx.o<br>
/home/echopixel/Desktop/engine/code/epx01/src/epx.cxx: In function ‘int main(int, char**)’:<br>/home/echopixel/Desktop/engine/code/epx01/src/epx.cxx:81: warning: deprecated conversion from string constant to ‘char*’<br>
/home/echopixel/Desktop/engine/code/epx01/src/epx.cxx:90: warning: deprecated conversion from string constant to ‘char*’<br>/home/echopixel/Desktop/engine/code/epx01/src/epx.cxx:113: error: no matching function forcall to ‘QtSlotAdaptor&lt;itk::CurvatureFlowImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt; &gt;::SetCallbackFunction(itk::SmartPointer&lt;itk::CurvatureFlowImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt; &gt;&amp;, void (itk::FiniteDifferenceImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt;::*)(unsigned int))’<br>

/home/echopixel/Desktop/engine/code/epx01/src/itkQtAdaptor.h:67: note: candidates are: void QtSlotAdaptor&lt;T&gt;::SetCallbackFunction(T*, void (T::*)()) [with T = itk::CurvatureFlowImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt;]<br>

/home/echopixel/Desktop/engine/code/epx01/src/itkQtAdaptor.h:76: note:                 void QtSlotAdaptor&lt;T&gt;::SetCallbackFunction(T*, void (T::*)(int)) [with T = itk::CurvatureFlowImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt;]<br>

/home/echopixel/Desktop/engine/code/epx01/src/itkQtAdaptor.h:85: note:                 void QtSlotAdaptor&lt;T&gt;::SetCallbackFunction(T*, void (T::*)(double)) [with T = itk::CurvatureFlowImageFilter&lt;itk::Image&lt;float, 2u&gt;, itk::Image&lt;float, 2u&gt; &gt;]<br>

make[2]: *** [CMakeFiles/epx01.dir/epx.cxx.o] Error 1<br>make[1]: *** [CMakeFiles/epx01.dir/all] Error 2<br>make: *** [all] Error 2</div><br>