Discussion:
[ITK-users] Extract Line/Intensity profile from image given start and stop points
G Tom
2018-01-31 17:08:24 UTC
Permalink
HI all

I am not sure if this is alread done before but I have 2D and 3D images and
I would like to extract a line/intensity profile through the image given a
start and and end point. The line need not be oriented parallel to any of
the major axis. Any ideas ?

I see the LineSpatialObject can define a line but how do I extract the line
from an image. Oh and one more thing, suppose I want to vary the radius of
the line , how can that be achieved.

Please let me now approaches and I will try them out.

Thanks
Dženan Zukić
2018-01-31 17:38:14 UTC
Permalink
Hi Tom,

does this <https://itk.org/Wiki/ITK/Examples/SimpleOperations/BresenhamLine>
example do what you want?

Regards,
DÅŸenan
Post by G Tom
HI all
I am not sure if this is alread done before but I have 2D and 3D images
and I would like to extract a line/intensity profile through the image
given a start and and end point. The line need not be oriented parallel to
any of the major axis. Any ideas ?
I see the LineSpatialObject can define a line but how do I extract the
line from an image. Oh and one more thing, suppose I want to vary the
radius of the line , how can that be achieved.
Please let me now approaches and I will try them out.
Thanks
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
gregthom992
2018-01-31 21:23:52 UTC
Permalink
Hi Dzenan,

itk::BresenhamLine seems to be what I need. Thanks for pointing that out. I
am going through the example, how do I give it a radius ?

Thanks

GT



--
Sent from: http://itk-users.7.n7.nabble.com/
The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com

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

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
https://itk.org/mailman/listinfo/insight-users
Dženan Zukić
2018-01-31 23:01:41 UTC
Permalink
Hi Tom,

BresenhamLine does not have a radius, it is only one pixel wide. If you
need some kind of averaging, you will probably need to resample the image.
There was a similar question last year, that thread
<https://public.kitware.com/pipermail/community/2017-April/012924.html>
will probably be helpful.

Regards,
DÅŸenan
Post by gregthom992
Hi Dzenan,
itk::BresenhamLine seems to be what I need. Thanks for pointing that out. I
am going through the example, how do I give it a radius ?
Thanks
GT
--
Sent from: http://itk-users.7.n7.nabble.com/
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
G Tom
2018-02-03 06:39:33 UTC
Permalink
Do you have an idea how to do this averaging over the line with a radius ?

I am also looking at vtkprobefilter.

Thanks

GT
Post by Dženan Zukić
Hi Tom,
BresenhamLine does not have a radius, it is only one pixel wide. If you
need some kind of averaging, you will probably need to resample the image.
There was a similar question last year, that thread
<https://public.kitware.com/pipermail/community/2017-April/012924.html>
will probably be helpful.
Regards,
DÅŸenan
Post by gregthom992
Hi Dzenan,
itk::BresenhamLine seems to be what I need. Thanks for pointing that out. I
am going through the example, how do I give it a radius ?
Thanks
GT
--
Sent from: http://itk-users.7.n7.nabble.com/
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
G Tom
2018-02-03 07:37:40 UTC
Permalink
Hi ,
I looked at the link you mentioned; the idea that comes to mind now is that
I first rotate my image so that one of the axis is aligned with the line,
then extract scan line along the rotated image axis possibly after re
sampling.
How do I rotate the image about a line defined by two points ?
Post by G Tom
Do you have an idea how to do this averaging over the line with a radius ?
I am also looking at vtkprobefilter.
Thanks
GT
Post by Dženan Zukić
Hi Tom,
BresenhamLine does not have a radius, it is only one pixel wide. If you
need some kind of averaging, you will probably need to resample the image.
There was a similar question last year, that thread
<https://public.kitware.com/pipermail/community/2017-April/012924.html>
will probably be helpful.
Regards,
DÅŸenan
Post by gregthom992
Hi Dzenan,
itk::BresenhamLine seems to be what I need. Thanks for pointing that out. I
am going through the example, how do I give it a radius ?
Thanks
GT
--
Sent from: http://itk-users.7.n7.nabble.com/
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
Dženan Zukić
2018-02-05 16:20:18 UTC
Permalink
Hi,

resample <https://itk.org/Doxygen/html/classitk_1_1ResampleImageFilter.html>
image filter can do the heavy lifting. But you do need to provide an
appropriate transform
<https://itk.org/Doxygen/html/classitk_1_1Rigid3DTransform.html>, relying
on linear algebra <https://en.wikipedia.org/wiki/Linear_algebra> - point
transformations etc.

Regards,
DÅŸenan
Post by G Tom
Hi ,
I looked at the link you mentioned; the idea that comes to mind now is
that I first rotate my image so that one of the axis is aligned with the
line, then extract scan line along the rotated image axis possibly after re
sampling.
How do I rotate the image about a line defined by two points ?
Post by G Tom
Do you have an idea how to do this averaging over the line with a radius ?
I am also looking at vtkprobefilter.
Thanks
GT
Post by Dženan Zukić
Hi Tom,
BresenhamLine does not have a radius, it is only one pixel wide. If you
need some kind of averaging, you will probably need to resample the image.
There was a similar question last year, that thread
<https://public.kitware.com/pipermail/community/2017-April/012924.html>
will probably be helpful.
Regards,
DÅŸenan
Post by gregthom992
Hi Dzenan,
itk::BresenhamLine seems to be what I need. Thanks for pointing that out. I
am going through the example, how do I give it a radius ?
Thanks
GT
--
Sent from: http://itk-users.7.n7.nabble.com/
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
Loading...