<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
{font-family:"MS Mincho"}
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
@font-face
{font-family:"\@MS Mincho"}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
span.EmailStyle17
{font-family:"Calibri","sans-serif";
color:#1F497D}
.MsoChpDefault
{font-family:"Calibri","sans-serif"}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
{}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Hi David,</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Thank you for the advice.
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I remember I tried to use vtkImageReslice, but I found it easier to use vtkImageResliceMapper, as all I have to do is to set camera information.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">As for pixel intensity, it seems I messed up reading DICOM.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Thank you, again.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Kenji</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif""> David Gobbi [mailto:david.gobbi@gmail.com]
<br>
<b>Sent:</b> Friday, April 08, 2016 1:30 PM<br>
<b>To:</b> Kenji Tsumura<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] vtkImageResliceMapper, vtkImageReslice and pixel intensity</span></p>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Hi Kenji,</p>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I advise against getting the vtkImageReslice object from the vtkImageResliceMapper. This object is meant to be for the mapper's own private use, and it most certainly will not always behave in the manner that you expect. Depending on
the code path taken by vtkImageResliceMapper, the reslice object's spacing and the range of its output will change in tricky ways that are not documented and that might change from one version of VTK to the next.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal">I'm sure that this isn't the answer you wanted, but if you want to reslice the image, then create a separate vtkImageReslice object outside of vtkImageResliceMapper.</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> - David</p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<p class="MsoNormal"> </p>
</div>
<div>
<div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">On Fri, Apr 8, 2016 at 12:08 PM, Kenji Tsumura <<a href="mailto:kenji.tsumura@neosoftmedical.com" target="_blank">kenji.tsumura@neosoftmedical.com</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal" style="">Hi,</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">I have 3D MRI dataset and I resliced the data using vtkImageResliceMapper.</p>
<p class="MsoNormal" style="">I find it difficult to figure out why the pixel intensity of resliced images is so different from the original.</p>
<p class="MsoNormal" style="">In the attached file, the resliced image (image on the left) shows the mean value of 21935.5, and the original image (image on the right) shows the mean value of 1447.5.</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">The following is the excerpt of my java source code.</p>
<p class="MsoNormal" style="">vtkExtendedImageResliceMapper extends vtkImageResliceMapper just to return ImageReslice, as there is no such public method.</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">---- initialization</p>
<p class="MsoNormal" style=""> vtkExtendedImageResliceMapper planeMapper = new vtkExtendedImageResliceMapper();</p>
<p class="MsoNormal" style=""> planeMapper.SetInputData(imageData);</p>
<p class="MsoNormal" style=""> planeMapper.SliceFacesCameraOn();</p>
<p class="MsoNormal" style=""> planeMapper.SliceAtFocalPointOn();</p>
<p class="MsoNormal" style=""> planeMapper.BorderOff();</p>
<p class="MsoNormal" style=""> planeMapper.SetSlabTypeToMean();</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">---- after reslice</p>
<p class="MsoNormal" style=""> // Get the image re-slice</p>
<p class="MsoNormal" style=""> vtkImageReslice imageReslice = planeMapper.GetImageReslice();</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style=""> // Get the image data</p>
<p class="MsoNormal" style=""> vtkImageData reslicedImageData = imageReslice.GetOutput();</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style=""> // Get the data array</p>
<p class="MsoNormal" style=""> vtkDataArray dataArray = reslicedImageData.GetPointData().GetScalars();</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style=""> // Get the data</p>
<p class="MsoNormal" style=""> float[] image = null;</p>
<p class="MsoNormal" style=""> if (dataArray instanceof vtkFloatArray) {</p>
<p class="MsoNormal" style=""> vtkFloatArray floatArray = (vtkFloatArray) dataArray;</p>
<p class="MsoNormal" style=""> image = floatArray.GetJavaArray();</p>
<p class="MsoNormal" style=""> }</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">My environtment:</p>
<p class="MsoNormal" style="">VTK 7.0.0</p>
<p class="MsoNormal" style="">CMake 3.1.1</p>
<p class="MsoNormal" style="">Visual Studio Professional 2013</p>
<p class="MsoNormal" style="">Eclipse Luna 4.4.1 (for my java application)</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">I would appreciate any advice.</p>
<p class="MsoNormal" style="">Thank you,</p>
<p class="MsoNormal" style=""> </p>
<p class="MsoNormal" style="">Kenji</p>
<p class="MsoNormal" style=""><span style="color:#222222"> </span></p>
<p class="MsoNormal" style=""><span style="color:black">“The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately
and delete the original message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.</span></p>
<p class="MsoNormal" style=""> </p>
</div>
<p class="MsoNormal">Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you
are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original
message and any copy of it from your computer system. If you have any questions concerning this message, please contact the sender.</p>
</div>
</div>
</div>
</div>
</div>
</div>
Disclaimer: The information contained in this communication may be confidential, is intended only for the use of the recipient(s) named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified
that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please return it to the sender immediately and delete the original message and any copy
of it from your computer system. If you have any questions concerning this message, please contact the sender.
</body>
</html>