[vtkusers] vtkImageResliceMapper, vtkImageReslice and pixel intensity
Kenji Tsumura
kenji.tsumura at neosoftmedical.com
Fri Apr 8 14:08:10 EDT 2016
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/0aed9f1d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Reslice.jpg
Type: image/jpeg
Size: 127831 bytes
Desc: Reslice.jpg
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160408/0aed9f1d/attachment-0001.jpg>
More information about the vtkusers
mailing list