<div dir="ltr">Alright,<div><br></div><div>The problem was in the module widget connection to the volume node...</div><div><br></div><div>Thanks for your help Julien.</div><div><br></div><div>/Ricardo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 1:19 PM, Ricardo Ortiz <span dir="ltr"><<a href="mailto:ricardo.ortiz@kitware.com" target="_blank">ricardo.ortiz@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Julien,<div><br></div><div>Thanks for the feedback...</div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Nov 19, 2014 at 12:16 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi Ricardo,<div><br></div>ctkTransferFunctionWidget is obsolete, please use the VTK charts instead:<div><a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKChartView.h" target="_blank">https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKChartView.h</a><br></div><div><br></div><div>In your case you might want to use <a href="https://github.com/commontk/CTK/blob/master/Libs/Visualization/VTK/Widgets/ctkVTKScalarsToColorsWidget.h" target="_blank">ctkVTKScalarsToColorsWidget</a></div></div></blockquote><div><br></div></span><div>This is the widget that I am using (sorry I meant to say ctkVTKScalarsToColorsWidget in the thread below). </div><div>I am looking at how the Volume Rendering (VolumePropertiesWidget) module is using this widget, and my understanding is that ctkVTKVolumePropertiyWidget (used by VolumePropertiesWidget) uses a vtkColorTransferFunction to update the view.</div><div><br></div><div>The main problem is that for some reason the widget does not display anything (only white).</div><div><br></div><div>Here is a snippet of how I update the ctkVTKScalarsToColorsWidget widget (or see the updateTransferFunction() in the attached file):</div><div><br></div><div><div>void updateTransferFunction()<br></div><div>{</div><div>...</div><div>  d->ColorTransferFunction->SetAlpha(1.0);</div><div>  d->ColorTransferFunction->Build();</div><div><br></div><div>  d->HistogramWidget->view()->setColorTransferFunctionToPlots(d->ColorTransferFunction);</div></div><div>}</div><div><br></div><div>Where d->HistogramWidget is an instance of ctkVTKScalarsToColorsWidget.</div><div><br></div><div>Thanks,</div><div><br></div><div>/Ricardo</div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>Hth,</div><div>Julien.</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Nov 19, 2014 at 5:19 PM, Ricardo Ortiz <span dir="ltr"><<a href="mailto:ricardo.ortiz@kitware.com" target="_blank">ricardo.ortiz@kitware.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><div dir="ltr"><div>To give a bit more context...</div><div><br></div>I am using ctkScalarsToColorsWidget in order to create a color histogram of the displayed volume using a vtkColorTransferFunction.<div><br></div><div>The problem is that the widget is not displaying anything.</div><div>I am using the widget's view (ctkScalarsToColorsView) and calling setColorTransferFunctionToPlots to update its color transfer function (once I have updated it).</div><div><br></div><div>Is this the correct way to have the widget display the colors?</div><div><br></div><div>Thanks in advance,</div><div><br></div><div>/Ricardo</div><div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 19, 2014 at 10:19 AM, Ricardo Ortiz <span dir="ltr"><<a href="mailto:ricardo.ortiz@kitware.com" target="_blank">ricardo.ortiz@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hello folks,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Does anyone knows of any examples that use transfer function widgets. I am trying to create a simple histogram widget (and being able to select points within the widget). </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks in advance,</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">/Ricardo</div></div>
</blockquote></div><br></div>
</div></div><br></div></div><span>_______________________________________________<br>
Ctk-developers mailing list<br>
<a href="mailto:Ctk-developers@public.kitware.com" target="_blank">Ctk-developers@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/ctk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/ctk-developers</a><br>
<br></span></blockquote></div><br></div>
</blockquote></span></div>​​​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://docs.google.com/a/kitware.com/file/d/0B5C_y6Y3RlVnZWxQMXlpUFRjV28/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">qSlicerScalarVolumeIntensitySegmenterHistogramWidget.cxx</span></a></div>​<br></div></div>
</blockquote></div><br></div>