<div dir="ltr">Hi Kadir,<div><br></div><div>I'm guessing for the path you are not using "~" but the actual absolute path?</div><div><br></div><div>I don't know anything on the DICOM part, but for Java I would suggest using the vtkCanvas class.</div><div><br></div><div>Seb </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 14, 2017 at 10:20 AM, Kadir Cenk <span dir="ltr"><<a href="mailto:kadircenk3@hotmail.com" target="_blank">kadircenk3@hotmail.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">
<div id="m_7966557308291459447divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Hello,</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">I am trying to develop an application in Java, using VTK to visualize DICOM files read from a directory, using a vtkImageViewer2 object to visualize. Below is the code segment that
I try to execute:<br>
<br>
</p>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
vtkDICOMImageReader reader = new vtkDICOMImageReader();<br>
reader.SetDirectoryName("~/<wbr>DICOM/abdomen_bt/3");<br>
reader.Update();<br>
<br>
vtkImageViewer2 imageViewer2 = new vtkImageViewer2();<br>
imageViewer2.<wbr>SetInputConnection(reader.<wbr>GetOutputPort());<br>
<br>
vtkRenderWindowInteractor renderWindowInteractor = new vtkRenderWindowInteractor();<br>
<br>
imageViewer2.SetupInteractor(<wbr>renderWindowInteractor);<br>
<br>
imageViewer2.Render();<br>
imageViewer2.GetRenderer().<wbr>ResetCamera();<br>
renderWindowInteractor.Start()<wbr>;<br>
imageViewer2.Render();</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
My problem is that, this code segment renders an empty screen. But when I convert the same code segment to C++, the window renders the DICOM image successfully.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
The path to the DICOM directory is valid, and DICOM files are not compressed (180 of them), and I am using VTK 7.1.0.<br>
<br>
What might be the problem? Any help will be appreciated.<br>
<br>
Thank you.</div><span class="HOEnZb"><font color="#888888">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">
<br>
Kadir Cenk</div>
<br>
<p></p>
</font></span></div>
</div>
<br>______________________________<wbr>_________________<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 <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>