<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1484227715048_11660"><span>Hello David.</span></div><div id="yui_3_16_0_ym19_1_1484227715048_11660" dir="ltr"><span id="yui_3_16_0_ym19_1_1484227715048_11795">I'm like wow. I didn't know that there was vtkDICOMReader too. I spent so many days figuring out lol. And I installed vtkDICOM before then I removed it while installing GDCM.<br>Thank you so much for informing me about vtkDICOMReader. I'll update my post so other people will know.</span></div><div id="yui_3_16_0_ym19_1_1484227715048_11660" dir="ltr"><span><br></span></div><div id="yui_3_16_0_ym19_1_1484227715048_11660" dir="ltr"><span id="yui_3_16_0_ym19_1_1484227715048_11989">Alex</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, 12 January 2017 9:24 PM, David Gobbi <david.gobbi@gmail.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv2485472893"><div><div dir="ltr"><div>Hi Alex,</div><div><br clear="none"></div><div>You can also try the vtkDICOMReader that comes with vtk-dicom. It provides easy access to all of the meta-data, rather than just the limited amount of information in the MedicalImageProperties object.</div><div><br clear="none"></div><div><a rel="nofollow" shape="rect" target="_blank" href="http://dgobbi.github.io/vtk-dicom/doc/api/pages.html">http://dgobbi.github.io/vtk-dicom/doc/api/pages.html</a><br clear="none"></div><div><br clear="none"></div><div>Cheers,</div><div>  - David</div><div class="yiv2485472893gmail_extra"><br clear="none"><div class="yiv2485472893yqt7904842422" id="yiv2485472893yqtfd02638"><div class="yiv2485472893gmail_quote">On Wed, Jan 11, 2017 at 11:04 PM, Alex Liu via vtkusers <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:vtkusers@vtk.org" target="_blank" href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a>></span> wrote:<br clear="none"><blockquote class="yiv2485472893gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex;">For those who are struggling with this I found a solution.<br clear="none">
first vtkDICOMImageReader doesn't support getting DICOM image properties for<br clear="none">
now(tested in vtk v7).<br clear="none">
To read DICOM image properties you need to download GDCM  can be downloaded<br clear="none">
from here <<a rel="nofollow" shape="rect" target="_blank" href="https://sourceforge.net/projects/gdcm/">https://sourceforge.net/ projects/gdcm/</a>><br clear="none">
<br clear="none">
after download and extracting GDCM you need to open CMake<br clear="none">
in CMake Check those attributes<br clear="none">
1-GDCM_USE_VTK and select VTK_DIR and vtk directory<br clear="none">
2-GDCM_BUILD_SHARED_LIBS<br clear="none">
3-GDCM_BUILD_APPLICATIONS<br clear="none">
now click configure and generate. Use your compiler to build it.<br clear="none">
<br clear="none">
In my case I got error while building GDCM that it could not find vtk lib<br clear="none">
files. which I already had in the folder. So I had to edit<br clear="none">
gdcm-2.6.6/build/cmake_ install.cmake file under INSTALL DESTINATION I had to<br clear="none">
add lib in front of vtkCommonCore-7.0.dll and the rest of the files, since<br clear="none">
in my vtk bin folder all my files had lib prefix.<br clear="none">
<br clear="none">
once GDCM is ready now you need to configure vtk<br clear="none">
open vtk in CMake and set and check those attributes<br clear="none">
1-GDCM_DIR select the build directory of GDCM<br clear="none">
2-USE_GDCM<br clear="none">
now configure and generate.<br clear="none">
now you are ready to build vtk.<br clear="none">
<br clear="none">
next thing you need to do is set environment variable for gdcm and import<br clear="none">
lib to your project.<br clear="none">
now you are ready to use GDCM<br clear="none">
<br clear="none">
To get DICOM image properties you need to do the following<br clear="none">
<br clear="none">
vtkSmartPointer< vtkGDCMImageReader> reader =<br clear="none">
vtkSmartPointer< vtkGDCMImageReader>::New();<br clear="none">
reader->SetFileName(filename. c_str());<br clear="none">
reader->Update();<br clear="none">
reader-> GetMedicalImageProperties()-> GetPatientName(); // to get Patient<br clear="none">
Name as an example<br clear="none">
<br clear="none">
double w,l;<br clear="none">
reader-> GetMedicalImageProperties()-> GetNthWindowLevelPreset(0, &w, &l); //<br clear="none">
get window width and window level.<br clear="none">
<br clear="none">
Hope this helps.<br clear="none">
<br clear="none">
for any question you can send me an email at <a rel="nofollow" shape="rect" ymailto="mailto:tehsunnliu@yahoo.com" target="_blank" href="mailto:tehsunnliu@yahoo.com">tehsunnliu@yahoo.com</a><br clear="none">
</blockquote></div><br clear="none"></div></div></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>