<div dir="ltr">I have a lot of DICOM files located in a <span style="background-color:rgb(255,255,255)"><font color="#000000">directory,but i just want to read some of them to perform 3D-Reconstruction,so i get the code the following:</font></span><div>
<font color="#000000"><br></font><div><span style="color:rgb(0,128,0)"> </span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkVolume16Reader</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(128,0,128)">vtkVolume16Reader</span><span style="color:rgb(0,0,0)">::</span>New<span style="color:rgb(0,0,0)">();</span></div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span>SetDataDimensions<span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">GetDataDimensions</span><span style="color:rgb(0,0,0)">());</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetImageRange</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">10</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span>SetDataByteOrderToLittleEndian<span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetFilePrefix</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"d:/S20"</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">imageseries</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetDataSpacing</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">3.2</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">3.2</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1.5</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">but the question is that as I run ,a error will be thrown out like that:</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"> </span><span style="color:rgb(170,0,170);font-family:Courier;font-size:10pt">ERROR: In D:\vtksrc\IO\vtkVolume16Reader.cxx, line 187</span></pre>
<p style="margin:0px"><span style="font-family:Courier;font-size:10pt;color:rgb(170,0,170)">vtkVolume16Reader (0x126063f0): x, y dimensions 0, 0must be greater than 0.</span></p><p style="margin:0px"><span style="font-family:Courier;font-size:10pt"><font color="#000000">I totally don't know why ?</font></span></p>
<p style="margin:0px"><span style="font-family:Courier;font-size:10pt"><font color="#000000"> Is there something wrong with my codes?</font></span></p>
<p style="margin:0px;font-family:Courier;font-size:10pt;color:rgb(170,0,170)"></p>
<pre style="margin-top:0px;margin-bottom:0px"></pre></div></div>