<div>Please always reply to the mailing list so everyone can search the responses.</div>
<div>&nbsp;</div>
<div>I&nbsp; think in fact this sample I wrote shows how to handle the dicom reader class encountering a non-dicom file:</div>
<div>&nbsp;</div>
<div><a href="http://devsample.org/index.php?option=com_content&amp;task=view&amp;id=49&amp;Itemid=27">http://devsample.org/index.php?option=com_content&amp;task=view&amp;id=49&amp;Itemid=27</a></div>
<div>&nbsp;</div>
<div>Give it a try,</div>
<div><br>Mark<br><br></div>
<div class="gmail_quote">On Mon, Apr 14, 2008 at 8:17 AM, &lt;<a href="mailto:polys_poly@hotmail.com">polys_poly@hotmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" name="Compose message area" bgcolor="#ffffff">
<div><font face="Arial" size="2">Thanks Mark for your reply.</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">The thing is i am kind a newbie&nbsp;in VTK and i have no idea what an error listener is or how i can attach it to the DICOM reader. If you can give me some info about this i would really appreciate it.</font></div>

<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Thanks,</font></div>
<div><font face="Arial" size="2">Polys</font></div>
<div style="FONT: 10pt Tahoma">
<div><br></div>
<div style="BACKGROUND: #f5f5f5">
<div><b>From:</b> <a title="mailto:markww@gmail.com
CTRL + Click to follow link" href="mailto:markww@gmail.com" target="_blank">Mark Wyszomierski</a> </div>
<div><b>Sent:</b> Monday, April 14, 2008 3:07 PM</div>
<div><b>To:</b> <a title="mailto:polys_poly@hotmail.com
CTRL + Click to follow link" href="mailto:polys_poly@hotmail.com" target="_blank">polys_poly@hotmail.com</a> </div>
<div><b>Cc:</b> <a title="vtkusers@vtk.org" href="mailto:vtkusers@vtk.org" target="_blank">VTK users group</a> </div>
<div><b>Subject:</b> Re: [vtkusers] vtkDICOMImageReader - reading ONLY the DICOM files in one folder</div></div></div>
<div>
<div></div>
<div class="Wj3C7c">
<div><br></div>
<div>I think I ran into the same problem awhile back. I attached an error listener to the DICOM reader, and it generates an error when a non-DICOM file is encountered. When this happens, I would check the error and if it was just a non-DICOM file I would continue processing. Not the best solution, but it worked.</div>

<div>&nbsp;</div>
<div>That was just for the demo projects I wrote, for actual image viewer stuff I used boost or native win32 methods for recursively going through a folder looking for only dcm files myself.</div>
<div>&nbsp;</div>
<div>Mark<br><br></div>
<div class="gmail_quote">On Mon, Apr 14, 2008 at 8:03 AM, &lt;<a href="mailto:polys_poly@hotmail.com" target="_blank">polys_poly@hotmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" name="Compose message area" bgcolor="#ffffff">
<div><font face="Arial" size="2">
<div><font face="Arial" size="2"></font><font face="Arial" size="2">Hello,</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">I want to read some DICOM images from a folder that also contains other files (not DICOM) for example .txt files. I use the following code</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">vtkDICOMImageReader* pRead = vtkDICOMImageReader::New();<br>pRead-&gt;SetDirectoryName(strPath.c_str());<br>pRead-&gt;Update();</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">But when it tries to read&nbsp;a .txt file for example&nbsp;I get error. Is there any way&nbsp;I can modify this code so&nbsp;I can read ONLY the DICOM images contained in the specific folder?</font></div>
<div><font face="Arial" size="2"></font>&nbsp;</div>
<div><font face="Arial" size="2">Thanks in advance,</font></div>
<div><font face="Arial" size="2">Polys</font></div></font></div></div><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br><br></blockquote></div><br></div></div></div></blockquote>
</div><br>