[vtkusers] vtkImageResliceMapper, vtkImageReslice and pixel intensity

David Gobbi david.gobbi at gmail.com
Fri Apr 8 14:30:07 EDT 2016


Hi Kenji,

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.

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.

 - David



On Fri, Apr 8, 2016 at 12:08 PM, Kenji Tsumura <
kenji.tsumura at neosoftmedical.com> wrote:

> Hi,
>
>
>
> I have 3D MRI dataset and I resliced the data using vtkImageResliceMapper.
>
> I find it difficult to figure out why the pixel intensity of resliced
> images is so different from the original.
>
> 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.
>
>
>
> The following is the excerpt of my java source code.
>
> vtkExtendedImageResliceMapper  extends vtkImageResliceMapper just to
> return  ImageReslice, as there is no such public method.
>
>
>
> ---- initialization
>
>         vtkExtendedImageResliceMapper  planeMapper = new
> vtkExtendedImageResliceMapper();
>
>         planeMapper.SetInputData(imageData);
>
>         planeMapper.SliceFacesCameraOn();
>
>         planeMapper.SliceAtFocalPointOn();
>
>         planeMapper.BorderOff();
>
>         planeMapper.SetSlabTypeToMean();
>
>
>
> ---- after reslice
>
>         // Get the image re-slice
>
>         vtkImageReslice imageReslice = planeMapper.GetImageReslice();
>
>
>
>         // Get the image data
>
>         vtkImageData reslicedImageData = imageReslice.GetOutput();
>
>
>
>         // Get the data array
>
>         vtkDataArray dataArray =
> reslicedImageData.GetPointData().GetScalars();
>
>
>
>         // Get the data
>
>         float[] image = null;
>
>         if (dataArray instanceof vtkFloatArray) {
>
>             vtkFloatArray floatArray = (vtkFloatArray) dataArray;
>
>             image = floatArray.GetJavaArray();
>
>         }
>
>
>
> My environtment:
>
> VTK 7.0.0
>
> CMake 3.1.1
>
> Visual Studio Professional 2013
>
> Eclipse Luna 4.4.1 (for my java application)
>
>
>
> I would appreciate any advice.
>
> Thank you,
>
>
>
> Kenji
>
>
>
> “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.
>
>
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160408/407c7932/attachment.html>


More information about the vtkusers mailing list