How to understand the slab thickness, slab resolution, spacing

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to understand the slab thickness, slab resolution, spacing

zhang qiang
Dear all

    I feel confused about some concepts about VTK. Currently, I need to reslice a 3D data to make the data isotropic, and I use vtkImageSlabReslice.

    Firstly, I read the data, the code is :

vtkSmartPointer<vtkDICOMImageReader> reader = vtkSmartPointer<vtkDICOMImageReader>::New();
        reader->SetDirectoryName("G:\\SNAP_Signal_Analysis\\snap_simulation\\SNAP_TOF_Data\\Chang Cheng\\TOF");
        reader->Update();

        vtkSmartPointer<vtkImageData> originalData = reader->GetOutput();
        int originalDims[3];
        double originalSpacing[3];
        originalData->GetDimensions(originalDims);
        originalData->GetSpacing(originalSpacing);

    My question is: how does the originalData record the data thickness information? Because I can not find the thickness from originalData.

    Then, I reslice the data by the following code:

    vtkSmartPointer<vtkImageSlabReslice> resliceFilter = vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        //resliceFilter->SetSlabResolution(0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

    Then, I check the output by:

    vtkSmartPointer<vtkImageData> reslicedData = resliceFilter->GetOutput();
        int reslicedDims[3];
        double reslicedSpacing[3];
        reslicedData->GetDimensions(reslicedDims);
        reslicedData->GetSpacing(reslicedSpacing);

     I find that the resliceFilter->SetSlabResolution is critical to get the correct pixel spacing. Without the resliceFilter->SetSlabResolution, the reslicedSpacing is (0.4,0.4,1), which means the SetOutputSpacing do not work. In the SetOutputSpacing(spacing[0],spaicng[1],spacing[3]), what's the meaning of spacing[3]? It is the thickness, or it is the spacing between slice?

     Through dicom viewer, I refer to the dicom header, and I am sure that originalSpacing[3] is the spacing between slice. So, Why resliceFilter->SetOutputSpacing(0.4,0.4,0.4) do not make reslicedSpacing[3]=0.4?

     In addition, I find two function in vtkImageSlabReslice: SetSlabThickness and SetSlabResolution. From some explanation from Internet, I guess that SetSlabThickness *NumBlendSamplePoints=SetSlabResolution. But, after test some case, I find it is wrong. And I have no idea about what is the relationship between slab thickness and slab resolution.

zhang qiang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

To make your data isotropic, I suggest using vtkImageReslice.  I don't see any reason to use vtkImageSlabReslice, but maybe you can explain in more detail why the "slab" part is important for your result.

VTK does not record the SliceThickness.  The VTK spacing measures the distance from the center of one slice to the center of the next slice.  If you need the thickness, you must get it from the DICOM metadata (e.g. you could use the vtkDICOMReader from github.com/dgobbi/vtk-dicom, which reads all of the metadata).

If you use vtkImageReslice, making the data isotropic should be as easy as this:

        vtkSmartPointer<vtkImageReslice> resliceFilter = vtkSmartPointer<vtkImageReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->Update();

There is no need to call resliceFilter->SetOutputDimensionality(3), since this is already the default.

 - David


On Fri, Jul 28, 2017 at 1:32 AM, zhang qiang <[hidden email]> wrote:
Dear all

    I feel confused about some concepts about VTK. Currently, I need to
reslice a 3D data to make the data isotropic, and I use vtkImageSlabReslice.

    Firstly, I read the data, the code is :

vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();

reader->SetDirectoryName("G:\\SNAP_Signal_Analysis\\snap_simulation\\SNAP_TOF_Data\\Chang
Cheng\\TOF");
        reader->Update();

        vtkSmartPointer<vtkImageData> originalData = reader->GetOutput();
        int originalDims[3];
        double originalSpacing[3];
        originalData->GetDimensions(originalDims);
        originalData->GetSpacing(originalSpacing);

    My question is: how does the originalData record the data thickness
information? Because I can not find the thickness from originalData.

    Then, I reslice the data by the following code:

    vtkSmartPointer<vtkImageSlabReslice> resliceFilter =
vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        //resliceFilter->SetSlabResolution(0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

    Then, I check the output by:

    vtkSmartPointer<vtkImageData> reslicedData = resliceFilter->GetOutput();
        int reslicedDims[3];
        double reslicedSpacing[3];
        reslicedData->GetDimensions(reslicedDims);
        reslicedData->GetSpacing(reslicedSpacing);

     I find that the resliceFilter->SetSlabResolution is critical to get the
correct pixel spacing. Without the resliceFilter->SetSlabResolution, the
reslicedSpacing is (0.4,0.4,1), which means the SetOutputSpacing do not
work. In the SetOutputSpacing(spacing[0],spaicng[1],spacing[3]), what's the
meaning of spacing[3]? It is the thickness, or it is the spacing between
slice?

     Through dicom viewer, I refer to the dicom header, and I am sure that
originalSpacing[3] is the spacing between slice. So, Why
resliceFilter->SetOutputSpacing(0.4,0.4,0.4) do not make
reslicedSpacing[3]=0.4?

     In addition, I find two function in vtkImageSlabReslice:
SetSlabThickness and SetSlabResolution. From some explanation from Internet,
I guess that SetSlabThickness *NumBlendSamplePoints=SetSlabResolution. But,
after test some case, I find it is wrong. And I have no idea about what is
the relationship between slab thickness and slab resolution.

zhang qiang

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

Please explain exactly what you mean by "thickness".  Usually only the spacing is needed for reslicing, so you need to help me understand why your situation is different.

Also, always CC your replies to the VTK users list.

 - David


On Fri, Jul 28, 2017 at 9:19 AM, [hidden email] <[hidden email]> wrote:
Dear David

because i need to set the thickness in the resliced image, and vtkimagereslice can not set the thickness. vtkimageslabreslice may have function to set thickness for the resliced image. so i need to know what is the meaning of slab.

zhang qiang


-------- 原始邮件 --------
主题:Re: [vtkusers] How to understand the slab thickness, slab resolution, spacing
发件人:David Gobbi
收件人:zhang qiang
抄送:VTK Users


Hi Zhang,

To make your data isotropic, I suggest using vtkImageReslice.  I don't see any reason to use vtkImageSlabReslice, but maybe you can explain in more detail why the "slab" part is important for your result.

VTK does not record the SliceThickness.  The VTK spacing measures the distance from the center of one slice to the center of the next slice.  If you need the thickness, you must get it from the DICOM metadata (e.g. you could use the vtkDICOMReader from github.com/dgobbi/vtk-dicom, which reads all of the metadata).

If you use vtkImageReslice, making the data isotropic should be as easy as this:

        vtkSmartPointer<vtkImageReslice> resliceFilter = vtkSmartPointer<vtkImageReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->Update();

There is no need to call resliceFilter->SetOutputDimensionality(3), since this is already the default.

 - David


On Fri, Jul 28, 2017 at 1:32 AM, zhang qiang <[hidden email]> wrote:
Dear all

    I feel confused about some concepts about VTK. Currently, I need to
reslice a 3D data to make the data isotropic, and I use vtkImageSlabReslice.

    Firstly, I read the data, the code is :

vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();

reader->SetDirectoryName("G:\\SNAP_Signal_Analysis\\snap_simulation\\SNAP_TOF_Data\\Chang
Cheng\\TOF");
        reader->Update();

        vtkSmartPointer<vtkImageData> originalData = reader->GetOutput();
        int originalDims[3];
        double originalSpacing[3];
        originalData->GetDimensions(originalDims);
        originalData->GetSpacing(originalSpacing);

    My question is: how does the originalData record the data thickness
information? Because I can not find the thickness from originalData.

    Then, I reslice the data by the following code:

    vtkSmartPointer<vtkImageSlabReslice> resliceFilter =
vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        //resliceFilter->SetSlabResolution(0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

    Then, I check the output by:

    vtkSmartPointer<vtkImageData> reslicedData = resliceFilter->GetOutput();
        int reslicedDims[3];
        double reslicedSpacing[3];
        reslicedData->GetDimensions(reslicedDims);
        reslicedData->GetSpacing(reslicedSpacing);

     I find that the resliceFilter->SetSlabResolution is critical to get the
correct pixel spacing. Without the resliceFilter->SetSlabResolution, the
reslicedSpacing is (0.4,0.4,1), which means the SetOutputSpacing do not
work. In the SetOutputSpacing(spacing[0],spaicng[1],spacing[3]), what's the
meaning of spacing[3]? It is the thickness, or it is the spacing between
slice?

     Through dicom viewer, I refer to the dicom header, and I am sure that
originalSpacing[3] is the spacing between slice. So, Why
resliceFilter->SetOutputSpacing(0.4,0.4,0.4) do not make
reslicedSpacing[3]=0.4?

     In addition, I find two function in vtkImageSlabReslice:
SetSlabThickness and SetSlabResolution. From some explanation from Internet,
I guess that SetSlabThickness *NumBlendSamplePoints=SetSlabResolution. But,
after test some case, I find it is wrong. And I have no idea about what is
the relationship between slab thickness and slab resolution.

zhang qiang


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

Please CC the vtkusers list in your replies!  Also please use proper capitalization and punctuation, otherwise I will simply ignore your emails.

In order to average slices to reduce noise, use this vtkImageReslice method:

    resliceFilter->SetSlabNumberOfSlices(N);

where N is the number of slices you want to be averaged.  So, to average over 10mm when the slices have 0.4mm spacing, use N=25.  The output slice spacing will still be 0.4mm.

The documentation for all the "Slab" methods for vtkImageReslice starts here:

 - David


On Fri, Jul 28, 2017 at 10:46 AM, [hidden email] <[hidden email]> wrote:
dear david

for example, if the thickness of image is 0, the image may have lots of noise. if the.thickness of image is 10mm, the image will look more smooth. i want the thickness of resliced image to be 10mm, which will make the image more smooth. can i set the thickness for the resliced image.

zhang qiang


-------- 原始邮件 --------
主题:Re: [vtkusers] How to understand the slab thickness, slab resolution, spacing
发件人:David Gobbi
收件人:[hidden email],VTK Users
抄送:



Hi Zhang,

Please explain exactly what you mean by "thickness".  Usually only the spacing is needed for reslicing, so you need to help me understand why your situation is different.

Also, always CC your replies to the VTK users list.

 - David


On Fri, Jul 28, 2017 at 9:19 AM, [hidden email] <[hidden email]> wrote:
Dear David

because i need to set the thickness in the resliced image, and vtkimagereslice can not set the thickness. vtkimageslabreslice may have function to set thickness for the resliced image. so i need to know what is the meaning of slab.

zhang qiang


-------- 原始邮件 --------
主题:Re: [vtkusers] How to understand the slab thickness, slab resolution, spacing
发件人:David Gobbi
收件人:zhang qiang
抄送:VTK Users


Hi Zhang,

To make your data isotropic, I suggest using vtkImageReslice.  I don't see any reason to use vtkImageSlabReslice, but maybe you can explain in more detail why the "slab" part is important for your result.

VTK does not record the SliceThickness.  The VTK spacing measures the distance from the center of one slice to the center of the next slice.  If you need the thickness, you must get it from the DICOM metadata (e.g. you could use the vtkDICOMReader from github.com/dgobbi/vtk-dicom, which reads all of the metadata).

If you use vtkImageReslice, making the data isotropic should be as easy as this:

        vtkSmartPointer<vtkImageReslice> resliceFilter = vtkSmartPointer<vtkImageReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->Update();

There is no need to call resliceFilter->SetOutputDimensionality(3), since this is already the default.

 - David


On Fri, Jul 28, 2017 at 1:32 AM, zhang qiang <[hidden email]> wrote:
Dear all

    I feel confused about some concepts about VTK. Currently, I need to
reslice a 3D data to make the data isotropic, and I use vtkImageSlabReslice.

    Firstly, I read the data, the code is :

vtkSmartPointer<vtkDICOMImageReader> reader =
vtkSmartPointer<vtkDICOMImageReader>::New();

reader->SetDirectoryName("G:\\SNAP_Signal_Analysis\\snap_simulation\\SNAP_TOF_Data\\Chang
Cheng\\TOF");
        reader->Update();

        vtkSmartPointer<vtkImageData> originalData = reader->GetOutput();
        int originalDims[3];
        double originalSpacing[3];
        originalData->GetDimensions(originalDims);
        originalData->GetSpacing(originalSpacing);

    My question is: how does the originalData record the data thickness
information? Because I can not find the thickness from originalData.

    Then, I reslice the data by the following code:

    vtkSmartPointer<vtkImageSlabReslice> resliceFilter =
vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        //resliceFilter->SetSlabResolution(0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

    Then, I check the output by:

    vtkSmartPointer<vtkImageData> reslicedData = resliceFilter->GetOutput();
        int reslicedDims[3];
        double reslicedSpacing[3];
        reslicedData->GetDimensions(reslicedDims);
        reslicedData->GetSpacing(reslicedSpacing);

     I find that the resliceFilter->SetSlabResolution is critical to get the
correct pixel spacing. Without the resliceFilter->SetSlabResolution, the
reslicedSpacing is (0.4,0.4,1), which means the SetOutputSpacing do not
work. In the SetOutputSpacing(spacing[0],spaicng[1],spacing[3]), what's the
meaning of spacing[3]? It is the thickness, or it is the spacing between
slice?

     Through dicom viewer, I refer to the dicom header, and I am sure that
originalSpacing[3] is the spacing between slice. So, Why
resliceFilter->SetOutputSpacing(0.4,0.4,0.4) do not make
reslicedSpacing[3]=0.4?

     In addition, I find two function in vtkImageSlabReslice:
SetSlabThickness and SetSlabResolution. From some explanation from Internet,
I guess that SetSlabThickness *NumBlendSamplePoints=SetSlabResolution. But,
after test some case, I find it is wrong. And I have no idea about what is
the relationship between slab thickness and slab resolution.

zhang qiang



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

zhang qiang
Dear David:

    Sorry for not CC to vtkusers list.

    For vtkImageReslice, if the output spacing[2] = 0.4, I can set the thickness of resliced image to 0.4*n by set the SetSlabNumberOfSlices to n. If I want the thickness to be 1mm, n will be 2.5. But the type of n is int, so n can not be 2.5, which means the thickness can not be 1mm if the outputspacing[2]=0.4. Am I right?

    On the other hand, I still feel confused about the vtkImageSlabReslice. What's the meaning of slab resolution and slab thickness? And after set the output spacing to (0.4,0.4,0.4), why the reslicedSpacing[2] of resliced image was not 0.4?

        vtkSmartPointer<vtkImageSlabReslice> resliceFilter = vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

        double reslicedSpacing[3];
        reslicedData->GetSpacing(reslicedSpacing);

     Best wishes!
zhang qiang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

The code for vtkImageSlabReslice shows what SlabThickness and SlabResolution do:

https://gitlab.kitware.com/vtk/vtk/blob/master/Imaging/General/vtkImageSlabReslice.cxx#L47

  this->NumBlendSamplePoints = 2*(static_cast<
      int >(this->SlabThickness/(2.0 * this->SlabResolution))) + 1;
  this->SlabNumberOfSlices = this->NumBlendSamplePoints;

and:

  spacing[2] = this->SlabResolution;

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.

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.

A different way to reduce image noise when reslicing is to use vtkImageSincInterpolator with SetBlurFactors:
but the result will be different from thick slicing.

 - David


On Sat, Jul 29, 2017 at 3:06 AM, zhang qiang <[hidden email]> wrote:
Dear David:

    Sorry for not CC to vtkusers list.

    For vtkImageReslice, if the output spacing[2] = 0.4, I can set the
thickness of resliced image to 0.4*n by set the SetSlabNumberOfSlices to n.
If I want the thickness to be 1mm, n will be 2.5. But the type of n is int,
so n can not be 2.5, which means the thickness can not be 1mm if the
outputspacing[2]=0.4. Am I right?

    On the other hand, I still feel confused about the vtkImageSlabReslice.
What's the meaning of slab resolution and slab thickness? And after set the
output spacing to (0.4,0.4,0.4), why the reslicedSpacing[2] of resliced
image was not 0.4?

        vtkSmartPointer<vtkImageSlabReslice> resliceFilter =
vtkSmartPointer<vtkImageSlabReslice>::New();
        resliceFilter->SetInputData(originalData);
        resliceFilter->SetOutputSpacing(0.4,0.4,0.4);
        resliceFilter->SetInterpolationModeToLinear();
        resliceFilter->SetOutputDimensionality(3);
        resliceFilter->Update();

        double reslicedSpacing[3];
        reslicedData->GetSpacing(reslicedSpacing);

     Best wishes!
zhang qiang



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

zhang qiang
Dear David:

      Something still make me confused.

      vtkImageReslice is used to reslice the image, and the output spacing is setted as (0.4, 0.4, 0.4). The SlabNumberOfSlices is default 1, so the thickness of the resliced image is 0.4? But what if the thickness of original image is 0.8? I think the thickness of original image is 0.8. And if the slab number of slice is n, the thickness of resliced image should be 0.8*n. Is that right.

      In this way, if the thickness of original image is 0.8, the thickness of resliced image must be 0.8*n?

zhang qiang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

Note that vtkImageReslice does not know the thickness of the input slices.  It only knows the spacing of the input slices.  There is no "thickness" information in vtkImageData.  So in your example, if the input spacing is 0.8mm, then vtkImageReslice still does not know the true "thickness" of the input slices.

When you call SetSlabNumberOfSlices(n), the thickness of the output slabs is n*(output spacing).  It is up to you to compute the number "n" that provides the output thickness that you need.

 - David



On Wed, Aug 2, 2017 at 2:51 AM, zhang qiang <[hidden email]> wrote:
Dear David:

      Something still make me confused.

      vtkImageReslice is used to reslice the image, and the output spacing
is setted as (0.4, 0.4, 0.4). The SlabNumberOfSlices is default 1, so the
thickness of the resliced image is 0.4? But what if the thickness of
original image is 0.8? I think the thickness of original image is 0.8. And
if the slab number of slice is n, the thickness of resliced image should be
0.8*n. Is that right.

      In this way, if the thickness of original image is 0.8, the thickness
of resliced image must be 0.8*n?

zhang qiang

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

zhang qiang
Dear David:

     Thanks a lot. And the vtkImageData also do not record the thickness information. I wonder why VTK ignore the thickness information? I think the thickness information is quite important for DICOM image. My guess is that we can not obtain the image whose thickness is 0.4 from the image whose thickness is 0.8. So,  the thickness information is useless in vtkImageData? Am I right?

zhang qiang
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

VTK - Users mailing list
vtkImageData is a regularly spaced collection of *point* samples,
there is no "thickness"...

Please refer to the classic "A Pixel Is Not A Little Square" :
http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf

Also, a shorter summary here:
http://graphics.cs.wisc.edu/WP/cs559-fall2014/2014/08/29/what-is-a-pixel-and-what-is-a-point-sample/


HTH,
David C.



On Wed, Aug 2, 2017 at 10:39 AM, zhang qiang <[hidden email]> wrote:

> Dear David:
>
>      Thanks a lot. And the vtkImageData also do not record the thickness
> information. I wonder why VTK ignore the thickness information? I think the
> thickness information is quite important for DICOM image. My guess is that
> we can not obtain the image whose thickness is 0.4 from the image whose
> thickness is 0.8. So,  the thickness information is useless in vtkImageData?
> Am I right?
>
> zhang qiang
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/How-to-understand-the-slab-thickness-slab-resolution-spacing-tp5744188p5744255.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to understand the slab thickness, slab resolution, spacing

David Gobbi
Hi Zhang,

The links in David Cole's email get to the heart of the issue, so please read them.  I think that we are using different definitions of "spacing" and "thickness".  The reason I think this, is because of your statement "obtain the image whose thickness is 0.4 from the image whose thickness is 0.8", which makes no sense to me.  Let us start with my definitions of "spacing" and "thickness":

The "spacing" is sample spacing, e.g. the distance from the center of one slice to the center of the next slice.

The "thickness" refers to the collimated X-ray beam width in CT, or to the selection slice thickness in 2D MRI.  Usually "thickness" is only approximate, because the slice profile is not uniform.  Essentially, the "slice profile" is the point-spread function in the slice direction, and "slice thickness" is a measure of the width of the slice profile.

Do you agree with these definitions?

So if a CT is acquired with a slice thickness of 0.8 mm, it is impossible to convert it to 0.4 mm.  that would break the laws of physics, so to speak.  It is possible to increase the slice thickness by averaging slices together or by applying other filtering operations, but decreasing the thickness is not possible.

The operations that vtkImageReslice can do are: 1) increasing or decreasing the spacing (by resampling with interpolation), and 2) increasing the thickness (by averaging, or by maximum intensity projection).

 - David



On Wed, Aug 2, 2017 at 8:48 AM, David Cole via vtkusers <[hidden email]> wrote:
vtkImageData is a regularly spaced collection of *point* samples,
there is no "thickness"...

Please refer to the classic "A Pixel Is Not A Little Square" :
http://alvyray.com/Memos/CG/Microsoft/6_pixel.pdf

Also, a shorter summary here:
http://graphics.cs.wisc.edu/WP/cs559-fall2014/2014/08/29/what-is-a-pixel-and-what-is-a-point-sample/


HTH,
David C.



On Wed, Aug 2, 2017 at 10:39 AM, zhang qiang <[hidden email]> wrote:
> Dear David:
>
>      Thanks a lot. And the vtkImageData also do not record the thickness
> information. I wonder why VTK ignore the thickness information? I think the
> thickness information is quite important for DICOM image. My guess is that
> we can not obtain the image whose thickness is 0.4 from the image whose
> thickness is 0.8. So,  the thickness information is useless in vtkImageData?
> Am I right?
>
> zhang qiang

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Loading...