<div dir="ltr">Hi dears,<div>why we have different 3D view from reading .mhd file or reading dicom files through FixedPointVolumeRayCastMapperCT </div><div><br></div><div><br></div><div>for example :</div><div>dicom reader --> <span style="color:rgb(100,100,130)">    </span><span style="color:rgb(255,139,255)">vtkDICOMImageReader</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">*</span>dicomReader<span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">=</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(255,139,255)">vtkDICOMImageReader</span><span style="color:rgb(207,191,173)">::</span>New<span style="color:rgb(207,191,173)">();</span></div>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>dicomReader<span style="color:#cfbfad">-></span>SetDirectoryName<span style="color:#cfbfad">(</span>dirname<span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>dicomReader<span style="color:#cfbfad">-></span><span style="font-style:italic">Update</span><span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>input<span style="color:#cfbfad">=</span>dicomReader<span style="color:#cfbfad">-></span>GetOutput<span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>reader<span style="color:#cfbfad">=</span>dicomReader<span style="color:#cfbfad">;</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">..</span></pre><pre style="margin-top:0px;margin-bottom:0px">
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>colorFun<span style="color:#cfbfad">-></span>AddRGBPoint<span style="color:#cfbfad">(</span><span style="color:#646482"> </span><span style="color:#cfbfad">-</span><span style="color:#f0ad6d">3024</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>colorFun<span style="color:#cfbfad">-></span>AddRGBPoint<span style="color:#cfbfad">(</span><span style="color:#646482"> </span><span style="color:#cfbfad">-</span><span style="color:#f0ad6d">1000</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.62</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.36</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.18</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>colorFun<span style="color:#cfbfad">-></span>AddRGBPoint<span style="color:#cfbfad">(</span><span style="color:#646482"> </span><span style="color:#cfbfad">-</span><span style="color:#f0ad6d">500</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.88</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.60</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.29</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.33</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.45</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>colorFun<span style="color:#cfbfad">-></span>AddRGBPoint<span style="color:#cfbfad">(</span><span style="color:#646482"> </span><span style="color:#f0ad6d">3071</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.83</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">.66</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">1</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>opacityFun<span style="color:#cfbfad">-></span>AddPoint<span style="color:#cfbfad">(-</span><span style="color:#f0ad6d">3024</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>opacityFun<span style="color:#cfbfad">-></span>AddPoint<span style="color:#cfbfad">(-</span><span style="color:#f0ad6d">1000</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>opacityFun<span style="color:#cfbfad">-></span>AddPoint<span style="color:#cfbfad">(-</span><span style="color:#f0ad6d">500</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">1.0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.33</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.45</span><span style="color:#646482"> </span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>opacityFun<span style="color:#cfbfad">-></span>AddPoint<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">3071</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">1.0</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.5</span><span style="color:#cfbfad">,</span><span style="color:#646482"> </span><span style="color:#f0ad6d">0.0</span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>mapper<span style="color:#cfbfad">-></span>SetBlendModeToComposite<span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>ShadeOn<span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>SetAmbient<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">0.1</span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>SetDiffuse<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">0.9</span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>SetSpecular<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">0.2</span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>SetSpecularPower<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">10.0</span><span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">      </span>property<span style="color:#cfbfad">-></span>SetScalarOpacityUnitDistance<span style="color:#cfbfad">(</span><span style="color:#f0ad6d">0.8919</span><span style="color:#cfbfad">);</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">===========================================================</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><font color="#cfbfad">mhd reader -- > </font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span><span style="color:#ff8bff">vtkMetaImageReader</span><span style="color:#646482"> </span><span style="color:#cfbfad">*</span>metaReader<span style="color:#646482"> </span><span style="color:#cfbfad">=</span><span style="color:#646482"> </span><span style="color:#ff8bff">vtkMetaImageReader</span><span style="color:#cfbfad">::</span>New<span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>metaReader<span style="color:#cfbfad">-></span><span style="font-style:italic">SetFileName</span><span style="color:#cfbfad">(</span>fileName<span style="color:#cfbfad">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>metaReader<span style="color:#cfbfad">-></span><span style="font-style:italic">Update</span><span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>input<span style="color:#cfbfad">=</span>metaReader<span style="color:#cfbfad">-></span>GetOutput<span style="color:#cfbfad">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:#646482">    </span>reader<span style="color:#cfbfad">=</span>metaReader<span style="color:#cfbfad">;</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad">.</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:#cfbfad"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">    </span>colorFun<span style="color:rgb(207,191,173)">-></span>AddRGBPoint<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">-</span><span style="color:rgb(240,173,109)">3024</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>colorFun<span style="color:rgb(207,191,173)">-></span>AddRGBPoint<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">-</span><span style="color:rgb(240,173,109)">1000</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.62</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.36</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.18</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>colorFun<span style="color:rgb(207,191,173)">-></span>AddRGBPoint<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">-</span><span style="color:rgb(240,173,109)">500</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.88</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.60</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.29</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.33</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.45</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>colorFun<span style="color:rgb(207,191,173)">-></span>AddRGBPoint<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">3071</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.83</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">.66</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">1</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>opacityFun<span style="color:rgb(207,191,173)">-></span>AddPoint<span style="color:rgb(207,191,173)">(-</span><span style="color:rgb(240,173,109)">3024</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>opacityFun<span style="color:rgb(207,191,173)">-></span>AddPoint<span style="color:rgb(207,191,173)">(-</span><span style="color:rgb(240,173,109)">1000</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>opacityFun<span style="color:rgb(207,191,173)">-></span>AddPoint<span style="color:rgb(207,191,173)">(-</span><span style="color:rgb(240,173,109)">500</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">1.0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.33</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.45</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>opacityFun<span style="color:rgb(207,191,173)">-></span>AddPoint<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">3071</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">1.0</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.5</span><span style="color:rgb(207,191,173)">,</span><span style="color:rgb(100,100,130)"> </span><span style="color:rgb(240,173,109)">0.0</span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>mapper<span style="color:rgb(207,191,173)">-></span>SetBlendModeToComposite<span style="color:rgb(207,191,173)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>ShadeOn<span style="color:rgb(207,191,173)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>SetAmbient<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">0.1</span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>SetDiffuse<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">0.9</span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>SetSpecular<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">0.2</span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>SetSpecularPower<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">10.0</span><span style="color:rgb(207,191,173)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(100,100,130)">      </span>property<span style="color:rgb(207,191,173)">-></span>SetScalarOpacityUnitDistance<span style="color:rgb(207,191,173)">(</span><span style="color:rgb(240,173,109)">0.8919</span><span style="color:rgb(207,191,173)">);</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(207,191,173)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(207,191,173)"><br></span></pre></pre></pre></div>