<div dir="ltr"><div class="markdown-here-wrapper" style="font-family:"Lucida Sans",Cantarell,Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Hi Elvis,</p>
<p style="margin:0px 0px 1.2em!important">Unfortunately, I wasn’t able to reproduce this issue. :(</p>
<p style="margin:0px 0px 1.2em!important">I don’t have a Windows machine with an Intel graphics card but tried ParaView on a couple of Windows machines as well as a Mac (with an Intel HD5600). Worked fine.</p><p style="margin:0px 0px 1.2em!important">At this point, I am inclined to think that the graphics drivers on your Windows machine may need updating.</p>
<div title="MDH:SGkgRWx2aXMsPGRpdj48YnI+PC9kaXY+PGRpdj5VbmZvcnR1bmF0ZWx5LCBJIHdhc24ndCBhYmxl
IHRvIHJlcHJvZHVjZSB0aGlzIGlzc3VlLjwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+SSBkb24n
dCBoYXZlIGEgV2luZG93cyBtYWNoaW5lIHdpdGggYW4gSW50ZWwgZ3JhcGhpY3MgY2FyZCBidXQg
dHJpZWQgUGFyYVZpZXcgb24gYSBjb3VwbGUgb2YgV2luZG93cyBtYWNoaW5lcyBhcyB3ZWxsIGFz
IGEgTWFjICh3aXRoIGFuIEludGVsIEhENTYwMCkuJm5ic3A7PC9kaXY+" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 24, 2017 at 12:16 PM Sankhesh Jhaveri <<a href="mailto:sankhesh.jhaveri@kitware.com">sankhesh.jhaveri@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="m_8666064557473140938markdown-here-wrapper" style="font-family:'Lucida Sans',Verdana,sans-serif;color:rgb(11,83,148)"><p style="margin:0px 0px 1.2em!important">Okay thanks.</p>
<p style="margin:0px 0px 1.2em!important">I’ll take a look.</p>
<div title="MDH:T2theSB0aGFua3MuPGRpdj48YnI+PC9kaXY+PGRpdj5JJ2xsIHRha2UgYSBsb29rLjxicj48L2Rp
dj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, May 24, 2017 at 8:18 AM Elvis Stansvik <<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2017-05-23 15:41 GMT+02:00 Sankhesh Jhaveri <<a href="mailto:sankhesh.jhaveri@kitware.com" target="_blank">sankhesh.jhaveri@kitware.com</a>>:<br>
> Hi Elvis,<br>
><br>
> Could you try downloading the ParaView nightly binary and test volume<br>
> rendering there? You can use the wavelet source for a test dataset. ParaView<br>
> uses the QVTKOpenGLWidget and it would be a good test before diving into the<br>
> code.<br>
<br>
I tried the wavelet example with Paraview 5.4.0-RC1-125-g435b603<br>
64-bit, and the problem is the same as in my minimal test case. The<br>
volume won't show up.<br>
<br>
It does show up if I switch to the software based ray cast mapper (but<br>
not with GPU or smart, which I guess both result in the GPU one being<br>
used).<br>
<br>
Please tell me if there's anything else I can do to help debugging.<br>
There are no errors printed when I run my test case.<br>
<br>
Elvis<br>
<br>
><br>
> Thanks,<br>
> Sankhesh<br>
><br>
><br>
> On Tue, May 23, 2017 at 6:50 AM Elvis Stansvik<br>
> <<a href="mailto:elvis.stansvik@orexplore.com" target="_blank">elvis.stansvik@orexplore.com</a>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> In porting to QVTKOpenGLWidget, I can't get volumes rendered using<br>
>> vtkGPUVolumeRayCastMapper to show up on Windows 7, Intel graphics (HD<br>
>> 4600). They show up fine on Linux. They also show up fine on Windows 7<br>
>> if using a plain VTK render window. I've tried turning off<br>
>> multisampling with setSamples(0) on the default QSurfaceFormat.<br>
>><br>
>> The below test case illustrates the issue. See the attached<br>
>> screenshots from running "TestCase" (left) and "TestCase 1" (right).<br>
>> The former uses a plain render window while the latter uses the new<br>
>> QVTKOpenGLWidget. Notice how in the Windows 7 screenshot, the plain<br>
>> VTK rendering works fine, but the QVTKOpenGLWidget one is not showing<br>
>> the volume.<br>
>><br>
>> Versions used:<br>
>><br>
>> Kubuntu Linux 16.04<br>
>> VTK 8.0.0.rc1, OpenGL2<br>
>> Qt 5.5.1<br>
>><br>
>> Windows 7<br>
>> VTK 8.0.0.rc1, OpenGL2<br>
>> Qt 5.6.2<br>
>><br>
>> Any ideas what the problem might be?<br>
>><br>
>> I can provide a standalone .zip distribution of my build of the test<br>
>> case if you want.<br>
>><br>
>> Note that this issue is orthogonal to the alpha issue I reported and<br>
>> got solved in my other thread.<br>
>><br>
>> Many thanks in advance,<br>
>> Elvis<br>
>><br>
>><br>
>> main.cpp:<br>
>><br>
>> #include <algorithm><br>
>><br>
>> #include <vtkColorTransferFunction.h><br>
>> #include <vtkGenericOpenGLRenderWindow.h><br>
>> #include <vtkGPUVolumeRayCastMapper.h><br>
>> #include <vtkImageData.h><br>
>> #include <vtkNew.h><br>
>> #include <vtkPiecewiseFunction.h><br>
>> #include <vtkProperty.h><br>
>> #include <vtkRenderer.h><br>
>> #include <vtkRenderWindow.h><br>
>> #include <vtkRenderWindowInteractor.h><br>
>> #include <vtkVolume.h><br>
>> #include <vtkVolumeProperty.h><br>
>><br>
>> #include <QVTKOpenGLWidget.h><br>
>><br>
>> #include <QApplication><br>
>><br>
>> int main(int argc, char *argv[])<br>
>> {<br>
>> auto defaultFormat = QVTKOpenGLWidget::defaultFormat();<br>
>> defaultFormat.setSamples(0);<br>
>> QSurfaceFormat::setDefaultFormat(defaultFormat);<br>
>><br>
>> QApplication app(argc, argv);<br>
>><br>
>> // Set up volume rendering<br>
>> vtkNew<vtkColorTransferFunction> colorFunction;<br>
>> colorFunction->AddRGBPoint(0.0, 0.0, 0.0, 0.0);<br>
>> colorFunction->AddRGBPoint(1.0, 0.0, 0.0, 0.0);<br>
>><br>
>> vtkNew<vtkPiecewiseFunction> opacityFunction;<br>
>> opacityFunction->AddPoint(0.0, 0.0);<br>
>> opacityFunction->AddPoint(1.0, 1.0);<br>
>><br>
>> vtkNew<vtkImageData> imageData;<br>
>> imageData->SetExtent(0, 200, 0, 200, 0, 200);<br>
>> imageData->AllocateScalars(VTK_FLOAT, 1);<br>
>> std::fill_n(static_cast<float *>(imageData->GetScalarPointer()),<br>
>> 8000000, 0.01);<br>
>><br>
>> vtkNew<vtkGPUVolumeRayCastMapper> volumeMapper;<br>
>> volumeMapper->SetInputData(imageData.Get());<br>
>><br>
>> vtkNew<vtkVolumeProperty> volumeProperty;<br>
>> volumeProperty->SetScalarOpacity(opacityFunction.Get());<br>
>> volumeProperty->SetColor(colorFunction.Get());<br>
>> volumeProperty->ShadeOff();<br>
>><br>
>> vtkNew<vtkVolume> volume;<br>
>> volume->SetMapper(volumeMapper.Get());<br>
>> volume->SetProperty(volumeProperty.Get());<br>
>><br>
>> vtkNew<vtkRenderer> renderer;<br>
>> renderer->AddVolume(volume.Get());<br>
>> renderer->SetBackground(1.0, 1.0, 1.0);<br>
>><br>
>> if (argc > 1) {<br>
>> // Render with QVTKOpenGLWidget<br>
>> vtkNew<vtkGenericOpenGLRenderWindow> window;<br>
>> window->AddRenderer(renderer.Get());<br>
>><br>
>> auto widget = new QVTKOpenGLWidget();<br>
>> widget->SetRenderWindow(window.Get());<br>
>> widget->show();<br>
>><br>
>> return app.exec();<br>
>> } else {<br>
>> // Render with "plain" render window / interactor<br>
>> vtkNew<vtkRenderWindow> window;<br>
>> window->AddRenderer(renderer.Get());<br>
>><br>
>> vtkNew<vtkRenderWindowInteractor> interactor;<br>
>> interactor->SetRenderWindow(window.Get());<br>
>> interactor->Start();<br>
>><br>
>> return 0;<br>
>> }<br>
>> }<br>
>><br>
>><br>
>> CMakeLists.txt:<br>
>><br>
>> cmake_minimum_required(VERSION 3.1)<br>
>><br>
>> project(TestCase)<br>
>><br>
>> find_package(VTK 8.0 COMPONENTS<br>
>> vtkCommonCore<br>
>> vtkCommonDataModel<br>
>> vtkCommonExecutionModel<br>
>> vtkCommonMath<br>
>> vtkFiltersSources<br>
>> vtkGUISupportQt<br>
>> vtkInteractionStyle<br>
>> vtkRenderingCore<br>
>> vtkRenderingOpenGL2<br>
>> vtkRenderingVolume<br>
>> vtkRenderingVolumeOpenGL2<br>
>> REQUIRED<br>
>> )<br>
>><br>
>> find_package(Qt5Widgets REQUIRED)<br>
>><br>
>> add_executable(TestCase main.cpp)<br>
>><br>
>> target_link_libraries(TestCase PUBLIC<br>
>> vtkCommonCore<br>
>> vtkCommonDataModel<br>
>> vtkCommonExecutionModel<br>
>> vtkCommonMath<br>
>> vtkFiltersSources<br>
>> vtkGUISupportQt<br>
>> vtkInteractionStyle<br>
>> vtkRenderingCore<br>
>> vtkRenderingOpenGL2<br>
>> vtkRenderingVolume<br>
>> vtkRenderingVolumeOpenGL2<br>
>> Qt5::Widgets<br>
>> )<br>
>><br>
>> target_include_directories(TestCase PUBLIC<br>
>> ${VTK_INCLUDE_DIRS}<br>
>> )<br>
>><br>
>> target_compile_definitions(TestCase PUBLIC<br>
>> ${VTK_DEFINITIONS}<br>
>> )<br>
>><br>
>> set_target_properties(TestCase PROPERTIES<br>
>> CXX_STANDARD 14<br>
>> CXX_STANDARD_REQUIRED ON<br>
>> )<br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
>><br>
> --<br>
><br>
> Sankhesh Jhaveri<br>
><br>
> Sr. Research & Development Engineer | Kitware | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div class="m_8666064557473140938inbox-markdown-here-wrapper" style="font-family:'proza libre',sans-serif;color:rgb(0,56,107)"><h5 id="m_8666064557473140938inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="m_8666064557473140938inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:'open sans',sans-serif;font-weight:normal"><em>Sr. Research & Development Engineer</em> | <a href="http://www.kitware.com/" target="_blank">Kitware</a> | <a href="tel:(518)%20881-4417" value="+15188814417" target="_blank">(518) 881-4417</a></h6>
<div title="MDH:PGIgc3R5bGU9ImZvbnQtZmFtaWx5OiB2ZXJkYW5hLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDEx
LCA4MywgMTQ4KTsiPjxmb250IHNpemU9IjIiPiMjIyMjU2Fua2hlc2ggSmhhdmVyaTwvZm9udD48
L2I+PGRpdj48Zm9udCBjb2xvcj0iIzBiNTM5NCIgZmFjZT0idmVyZGFuYSwgc2Fucy1zZXJpZiIg
c2l6ZT0iMiI+PGI+PGJyPjwvYj48L2ZvbnQ+PGRpdj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6
IGFyaWFsLCBzYW5zLXNlcmlmOyBjb2xvcjogcmdiKDExLCA4MywgMTQ4KTsiPjxzcGFuIHN0eWxl
PSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsiPjxpPiMjIyMjIypTci4gUmVzZWFy
Y2ggJmFtcDsgRGV2ZWxvcG1lbnQgRW5naW5lZXIqPC9pPiZuYnNwO3wmbmJzcDs8L3NwYW4+PC9z
cGFuPjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFuYSwgc2Fucy1zZXJpZjsgY29sb3I6
IHJnYigxMSwgODMsIDE0OCk7Ij48YSBocmVmPSJodHRwOi8vd3d3LmtpdHdhcmUuY29tLyIgdGFy
Z2V0PSJfYmxhbmsiIHN0eWxlPSJjb2xvcjogcmdiKDE3LCA4NSwgMjA0KTsiPktpdHdhcmU8L2E+
Jm5ic3A7fCZuYnNwOzwvc3Bhbj48c3BhbiBzdHlsZT0iZm9udC1mYW1pbHk6IHZlcmRhbmEsIHNh
bnMtc2VyaWY7IGNvbG9yOiByZ2IoMTEsIDgzLCAxNDgpOyI+KDUxOCkgODgxLTQ0MTc8L3NwYW4+
PGJyPjwvZGl2PjxkaXY+PGRpdj48ZGl2PjxzcGFuIHN0eWxlPSJmb250LWZhbWlseTogdmVyZGFu
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div></div></blockquote></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-markdown-here-wrapper" style="font-family:'proza libre',sans-serif;color:rgb(0,56,107)"><h5 id="inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:'open sans',sans-serif;font-weight:normal"><em>Sr. Research &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u
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div></div>