<div dir="ltr"><div>Hi Zhang,</div><div><br></div><div>The code for vtkImageSlabReslice shows what SlabThickness and SlabResolution do:</div><div><br></div><a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Imaging/General/vtkImageSlabReslice.cxx#L47" target="_blank">https://gitlab.kitware.com/<wbr>vtk/vtk/blob/master/Imaging/<wbr>General/vtkImageSlabReslice.<wbr>cxx#L47</a><br><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">  this->NumBlendSamplePoints = 2*(static_cast<</div><div class="gmail_extra">      int >(this->SlabThickness/(2.0 * this->SlabResolution))) + 1;</div><div class="gmail_extra">  this->SlabNumberOfSlices = this->NumBlendSamplePoints;</div><div><br></div></div><div class="gmail_extra">and:</div><div class="gmail_extra"><br></div><div class="gmail_extra">  spacing[2] = this->SlabResolution;<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">The SlabThickness is only used to compute the SlabNumberOfSlices (which is an integer).  And the SlabResolution overrides the slice spacing.  The vtkImageSlabReslice filter is not meant to be used as a 3D output filter.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The output slice thickness is always an integer multiple of the output slice spacing.  This can be tweaked a little with the TrapezoidIntegration option, but a true fractional slice thickness isn't possible.</div><div class="gmail_extra"><a href="http://www.vtk.org/doc/nightly/html/classvtkImageReslice.html#a9a8fb0ce5f767733bbce72f5be32b409" target="_blank">http://www.vtk.org/doc/<wbr>nightly/html/<wbr>classvtkImageReslice.html#<wbr>a9a8fb0ce5f767733bbce72f5be32b<wbr>409</a><br></div><div class="gmail_extra"><a href="https://en.wikipedia.org/wiki/Trapezoidal_rule" target="_blank">https://en.wikipedia.org/wiki/<wbr>Trapezoidal_rule</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">A different way to reduce image noise when reslicing is to use vtkImageSincInterpolator with SetBlurFactors:</div><div class="gmail_extra"><a href="http://www.vtk.org/doc/nightly/html/classvtkImageSincInterpolator.html#aa662697dec4b11dacfc21e062fb1551f" target="_blank">http://www.vtk.org/doc/<wbr>nightly/html/<wbr>classvtkImageSincInterpolator.<wbr>html#<wbr>aa662697dec4b11dacfc21e062fb15<wbr>51f</a><br></div><div class="gmail_extra">but the result will be different from thick slicing.</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 29, 2017 at 3:06 AM, zhang qiang <span dir="ltr"><<a href="mailto:zhang07101@126.com" target="_blank">zhang07101@126.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear David:<br>
<br>
    Sorry for not CC to vtkusers list.<br>
<br>
    For vtkImageReslice, if the output spacing[2] = 0.4, I can set the<br>
thickness of resliced image to 0.4*n by set the SetSlabNumberOfSlices to n.<br>
If I want the thickness to be 1mm, n will be 2.5. But the type of n is int,<br>
so n can not be 2.5, which means the thickness can not be 1mm if the<br>
outputspacing[2]=0.4. Am I right?<br>
<br>
    On the other hand, I still feel confused about the vtkImageSlabReslice.<br>
What's the meaning of slab resolution and slab thickness? And after set the<br>
output spacing to (0.4,0.4,0.4), why the reslicedSpacing[2] of resliced<br>
image was not 0.4?<br>
<span class="m_5580431292913141088gmail-"><br>
        vtkSmartPointer<vtkImageSlabRe<wbr>slice> resliceFilter =<br>
vtkSmartPointer<vtkImageSlabRe<wbr>slice>::New();<br>
        resliceFilter->SetInputData(or<wbr>iginalData);<br>
        resliceFilter->SetOutputSpacin<wbr>g(0.4,0.4,0.4);<br>
</span><span class="m_5580431292913141088gmail-">        resliceFilter->SetInterpolatio<wbr>nModeToLinear();<br>
        resliceFilter->SetOutputDimens<wbr>ionality(3);<br>
        resliceFilter->Update();<br>
<br>
</span>        double reslicedSpacing[3];<br>
        reslicedData->GetSpacing(resli<wbr>cedSpacing);<br>
<br>
     Best wishes!<br>
zhang qiang<br><br>
</blockquote></div><br></div></div>