[vtkusers] Problems with vtkImageReslice
    David Gobbi 
    david.gobbi at gmail.com
       
    Fri Oct 27 09:21:18 EDT 2017
    
    
  
It looks like an integer overflow problem.  Perhaps the data is "unsigned
short" but was read as "short"?
Just in case the Cubic interpolation is causing overflow (since cubic
interpolation has undershoots/overshoots), try linear interpolation:
resliceFilter->SetSlabModeToMaximum();
resliceFilter->SetSlabNumberOfSlices(3);
resliceFilter->SetInterpolationModeToLinear();
 - David
On Fri, Oct 27, 2017 at 5:38 AM, DJQ <836856733 at qq.com> wrote:
> vtkSmartPointer<vtkImageReslice> resliceFilter =
> vtkSmartPointer<vtkImageReslice>::New();
> resliceFilter->SetInputData(m_spVtkImageData);
> resliceFilter->SetOutputSpacing(resliceSpacing,resliceSpacing,
> resliceSpacing);
> resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
> resliceFilter->SetSlabModeToMean();
> resliceFilter->SetSlabNumberOfSlices(1);
> resliceFilter->SetInterpolationModeToCubic();
> resliceFilter->Update();
>
> m_spVtkImageData=resliceFilter->GetOutput();
>
> I want to reslice the m_spVtkImageData to make it isotropic, as
> 0.4*0.4*0.4.
> However, when I use MIP to show this resliced image, it suggests that there
> must be some problems. What's wrong with that?
>
>
> <http://vtk.1045678.n5.nabble.com/file/t342141/MIP.png>
>
> <http://vtk.1045678.n5.nabble.com/file/t342141/ImageResliced.png>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171027/779be3f3/attachment.html>
    
    
More information about the vtkusers
mailing list