How to set default scalar value when using vtkImageReslice

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set default scalar value when using vtkImageReslice

Jounly
Dear all,
I am trying to use vtkImageReslice to generate an oblique slice from the
image volume. However, when some part of the output image is outside the
volume, the scalar value of the region is very large, which I want it to be
small as it is the background. I am wondering that is there any function
which I can call to set the default scalar value generated by
vtkImageReslice when it is outside the image volume?
Any help would be appreciated, thanks in advance.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to set default scalar value when using vtkImageReslice

Cory Quammen-2
I would guess SetBackgroundColor (double, double, double, double) or SetBackgroundLevel (double v) might be what you are looking for, though I'm not sure because their default values are (0, 0, 0, 0) and 0, respectively.

- Cory

On Thu, Apr 12, 2018 at 11:23 PM, Jounly <[hidden email]> wrote:
Dear all,
I am trying to use vtkImageReslice to generate an oblique slice from the
image volume. However, when some part of the output image is outside the
volume, the scalar value of the region is very large, which I want it to be
small as it is the background. I am wondering that is there any function
which I can call to set the default scalar value generated by
vtkImageReslice when it is outside the image volume?
Any help would be appreciated, thanks in advance.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers



--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.

_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to set default scalar value when using vtkImageReslice

Jounly
Hi, thanks for your reply! I figured out that the default scalar value is 0.
The reason that I thought the value was large is that it appeared to be much
brighter than other pixels inside the volume. and it turned out to be the
problem of indirectly set window/ level because most of the scalar value of
the pixels inside the volume is much smaller than 0. Again, thanks for your
reply~



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to set default scalar value when using vtkImageReslice

Cory Quammen-2
Ah, good point - there are a good many values for which 0 is a large number! I'm glad it was an easy fix.

On Fri, Apr 13, 2018 at 4:45 AM, Jounly <[hidden email]> wrote:
Hi, thanks for your reply! I figured out that the default scalar value is 0.
The reason that I thought the value was large is that it appeared to be much
brighter than other pixels inside the volume. and it turned out to be the
problem of indirectly set window/ level because most of the scalar value of
the pixels inside the volume is much smaller than 0. Again, thanks for your
reply~



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers



--
Cory Quammen
Staff R&D Engineer
Kitware, Inc.

_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: How to set default scalar value when using vtkImageReslice

David Gobbi
The CT number for air is -1000, so for CT with real-world (i.e. Hounsfield) data values, it's best to set the background to <= -1000.  

On Fri, Apr 13, 2018 at 6:59 AM, Cory Quammen <[hidden email]> wrote:
Ah, good point - there are a good many values for which 0 is a large number! I'm glad it was an easy fix.

On Fri, Apr 13, 2018 at 4:45 AM, Jounly <[hidden email]> wrote:
Hi, thanks for your reply! I figured out that the default scalar value is 0.
The reason that I thought the value was large is that it appeared to be much
brighter than other pixels inside the volume. and it turned out to be the
problem of indirectly set window/ level because most of the scalar value of
the pixels inside the volume is much smaller than 0. Again, thanks for your
reply~


_______________________________________________
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:
https://vtk.org/mailman/listinfo/vtkusers