Discussion:
[ITK-users] Cardiac Deformation using Segmentation and Registration of Ultrasound Images
Matt McCormick
2017-08-01 21:23:59 UTC
Permalink
Hi Thanos,

A few thoughts,

- The ultrasound speckle can interfere with the segmentation --
itk::CurvatureAnisotropicDiffusionImageFilter is one approach, but the
ITKAnisotropicDiffusionLBR filters can give better results [1].
- Active contour segmentation is also available in ITK. It works in 3D
and it is fast.
- One approach is to generate signed distance maps from the
segmentations, then register the signed distance maps.
- Another approach is to generate itk::PointSet's from the
segmentation, the register the point sets with [2].

Hope this helps,
Matt

[1] https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR

[2] https://itk.org/Doxygen/html/classitk_1_1PointSetToPointSetMetricv4.html
Hello everyone,
The past months I have been working on tasks of Segmentation and
Registration of 4D ultrasound images so I can eventually do a proper Cardiac
Deformation analysis. Unfortunately I am struggling on my own to solve these
problems so I still haven't found a proper workflow and this is why I am
posting here in case someone has a suggestion or a recommendation.
For the acquisition of my data, a pig heart was placed inside a water tank
with the 4D transducer on the bottom of the tank (the apex of the heart was
about 5 cm from the transducer) and with around 50 volumes per second I
obtained images of 120x90x80, that after masking I ended up with volumes of
75x70x52 (x,y,z).
So far, I use Curvature Anisotropic Diffusion using the ITK libraries in
order to perform an automatic segmentation using Active Contours (with
Matlab). I filtered my data, mostly to assist my 2D segmentation algorithm,
which I perform slice by slice on the z axis. I obtain a 3D model using the
isosurfaces.
Then I tried both the Demons registration and the Bsplines registration on
the 3D volumes. I tried both on the original (unsegmented) data and two
segmented volumes, but I can not say that I am quite satisfied with any of
the results.
1) Is it necessary to perform segmentation before the registration since my
heart is placed in a water tank, so there are no other organs around?
2) Should the registration be done on the filtered or the unfiltered data?
3) I am not satisfied at all with my segmentation algorithm since active
contours are quite sensitive to noise and because of the nature of the data
I have to use different parameters for every 4-5 slices. Therefore I was
thinking to perform an almost manual segmentation on one volume and then use
registration for the segmentation of the rest (if that is necessary). So I
am now studying and trying to say if something like that is possible (and
especially on ITK). If someone knows something about it, I would be happy to
hear.
4) What would be a proper number of grid points for my 75x70x52 images, when
using the B-Splines registration?
I am sorry for the long post but I have been struggling for too long with
this problem and I would really appreciate any kind of help.
Best regards,
Thanos
_____________________________________
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
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
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:
http://public.kitware.com/mailman/listinfo/insight-users
Matt McCormick
2017-08-04 13:36:34 UTC
Permalink
Hi Thanos,
Hello everyone,
Dženan, Andras and Matt thank you very much for your answers.
To be honest I've tried already in the past registration with Slicer using
Demons, B-Splines and also Elastix and Plastimach.
Dženan, I read your last sentence already many times but I can't really
understand what you mean by "initializing registration of time point n+1 by
resulting transform from time point n."
Matt, thank you for sharing your thoughts. I already looked at the
AnisotropicDiffusionLBR paper and I have also tried the online interactive
figures
(https://insightsoftwareconsortium.github.io/ITKAnisotropicDiffusionLBR/).
Seems to work nicely, but I wasn't sure how to build the project. I already
configured my ITK by setting the Module_AnisotropicDiffusionLBR at the CMake
and then I tried to build the CoherenceEnhancingDiffusion from the
C:\ITK\src\Modules\Remote\AnisotropicDiffusionLBR\examples but I got "
Cannot open include file: 'CoherenceEnhancingDiffusionFilter.h': No such
file or directory " so I guess I am missing something..
Thanks for the note. I will look into this issue and address it next week.
I tried in the past to perform segmentation using the
GeodesicActiveContourImageFilter (first for 2D images) but I miserably
failed to get a descent result. I then tried to extend it to 3D but I think
that even though I built the project I was not getting valid results (it was
some months ago so I don't remember exactly).
Now, on important question that I have is how important is it to have a
perfect segmentation in order to perform registration? Is it maybe enough to
just get a just descent segmentation that includes the whole heart even if
that means that the active contours stop before the reach the actual
boundary?
I guess I have to first proceed in a good segmentation before going back to
the registration problems..
In general, "it depends," but segmentation and registration problems
can be viewed as coupled. In general we need to identify structures
before we can register them. Preprocessing filtering step that reduce
noise could be viewed in this respect.
Also, I suppose that the registration should not be done to the filtered
images but to the original in order to preserve the speckle noise which
includes some kind of information. Is that correct?
Right. The speckle is not actually noise. It is signal that does not
change and indicates the location of tissue. Some motion tracking
techniques, like ultrasound strain imaging, use the speckle signal
exclusively. However, some registration techniques may be confounded
by local minima in the cost function caused my high frequency content.
And, the speckle can change when motion is large and the ultrasound
beam encounters the tissue at a different angles.
I will have a look within the next days to the last two approaches that you
suggested, although, with a first glance, it wasn't quite obvious how the
PointSetToPointSetMetric works, but I will try to study it a bit more.
There are some tests in the ITK test suite that demonstrate how to use
the new point set registration framework.


Hope this helps,
Matt
_____________________________________
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:
http://public.k
Matt McCormick
2017-08-11 16:55:39 UTC
Permalink
On Fri, Aug 4, 2017 at 9:36 AM, Matt McCormick
Post by Matt McCormick
Hi Thanos,
Hello everyone,
Dženan, Andras and Matt thank you very much for your answers.
To be honest I've tried already in the past registration with Slicer using
Demons, B-Splines and also Elastix and Plastimach.
Dženan, I read your last sentence already many times but I can't really
understand what you mean by "initializing registration of time point n+1 by
resulting transform from time point n."
Matt, thank you for sharing your thoughts. I already looked at the
AnisotropicDiffusionLBR paper and I have also tried the online interactive
figures
(https://insightsoftwareconsortium.github.io/ITKAnisotropicDiffusionLBR/).
Seems to work nicely, but I wasn't sure how to build the project. I already
configured my ITK by setting the Module_AnisotropicDiffusionLBR at the CMake
and then I tried to build the CoherenceEnhancingDiffusion from the
C:\ITK\src\Modules\Remote\AnisotropicDiffusionLBR\examples but I got "
Cannot open include file: 'CoherenceEnhancingDiffusionFilter.h': No such
file or directory " so I guess I am missing something..
Thanks for the note. I will look into this issue and address it next week.
This is addressed here:

http://review.source.kitware.com/#/c/22567/
https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/commit/3d9880d5f52c4c37e3b658abc607a13f3c3d9545

I will also create a Python package for the module.

Thanks,
Matt
_____________________________________
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:
http://public.kitware.com/mai
thanos thanos
2017-08-14 16:42:19 UTC
Permalink
Hello again,

Matt, thank you for solving the example issue. I tried to use the filter
and although it worked great for a 2D png image, it failed for a 2D jpg and
dicom images as well as for a 3D nrrd volume. I got the error "Could not
create ImageIO" so maybe that has to do with the ImageIOFactory.

I liked the suggested and accepted values when I run the .exe but maybe to
avoid confusion you could replace the
"Weickert diffusion type. Accepted values: Edge, Coherence. Default: Edge."
with
Weickert diffusion type. Accepted values: EED cEED CED cCED Isotropic"

Best regards,
Thanos
Post by Matt McCormick
On Fri, Aug 4, 2017 at 9:36 AM, Matt McCormick
Post by Matt McCormick
Hi Thanos,
Hello everyone,
DÅŸenan, Andras and Matt thank you very much for your answers.
To be honest I've tried already in the past registration with Slicer
using
Post by Matt McCormick
Demons, B-Splines and also Elastix and Plastimach.
DÅŸenan, I read your last sentence already many times but I can't really
understand what you mean by "initializing registration of time point
n+1 by
Post by Matt McCormick
resulting transform from time point n."
Matt, thank you for sharing your thoughts. I already looked at the
AnisotropicDiffusionLBR paper and I have also tried the online
interactive
Post by Matt McCormick
figures
(https://insightsoftwareconsortium.github.io/
ITKAnisotropicDiffusionLBR/).
Post by Matt McCormick
Seems to work nicely, but I wasn't sure how to build the project. I
already
Post by Matt McCormick
configured my ITK by setting the Module_AnisotropicDiffusionLBR at the
CMake
Post by Matt McCormick
and then I tried to build the CoherenceEnhancingDiffusion from the
C:\ITK\src\Modules\Remote\AnisotropicDiffusionLBR\examples but I got "
Cannot open include file: 'CoherenceEnhancingDiffusionFilter.h': No
such
Post by Matt McCormick
file or directory " so I guess I am missing something..
Thanks for the note. I will look into this issue and address it next
week.
http://review.source.kitware.com/#/c/22567/
https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/
commit/3d9880d5f52c4c37e3b658abc607a13f3c3d9545
I will also create a Python package for the module.
Thanks,
Matt
Matt McCormick
2017-09-08 18:30:53 UTC
Permalink
Hello Thanos,

Yes, to add support for additional image formats, add the
corresponding ITK module to the find_package(ITK COMPONENTS ... call:

https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/blob/50acf46da9fa1480eb502a0bb550c36d518893eb/examples/CMakeLists.txt#L8


Thank you for the suggested correction to the usage documentation. It
is added here:

https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/pull/12


A Python package is now available for the module. It can be installed via

python -m pip install --upgrade pip
python -m pip install itk-anisotropicdiffusionlbr



Thanks,
Matt
Post by thanos thanos
Hello again,
Matt, thank you for solving the example issue. I tried to use the filter and
although it worked great for a 2D png image, it failed for a 2D jpg and
dicom images as well as for a 3D nrrd volume. I got the error "Could not
create ImageIO" so maybe that has to do with the ImageIOFactory.
I liked the suggested and accepted values when I run the .exe but maybe to
avoid confusion you could replace the
"Weickert diffusion type. Accepted values: Edge, Coherence. Default: Edge."
with
Weickert diffusion type. Accepted values: EED cEED CED cCED Isotropic"
Best regards,
Thanos
Post by Matt McCormick
On Fri, Aug 4, 2017 at 9:36 AM, Matt McCormick
Post by Matt McCormick
Hi Thanos,
Hello everyone,
Dženan, Andras and Matt thank you very much for your answers.
To be honest I've tried already in the past registration with Slicer using
Demons, B-Splines and also Elastix and Plastimach.
Dženan, I read your last sentence already many times but I can't really
understand what you mean by "initializing registration of time point n+1 by
resulting transform from time point n."
Matt, thank you for sharing your thoughts. I already looked at the
AnisotropicDiffusionLBR paper and I have also tried the online interactive
figures
(https://insightsoftwareconsortium.github.io/ITKAnisotropicDiffusionLBR/).
Seems to work nicely, but I wasn't sure how to build the project. I already
configured my ITK by setting the Module_AnisotropicDiffusionLBR at the CMake
and then I tried to build the CoherenceEnhancingDiffusion from the
C:\ITK\src\Modules\Remote\AnisotropicDiffusionLBR\examples but I got "
Cannot open include file: 'CoherenceEnhancingDiffusionFilter.h': No such
file or directory " so I guess I am missing something..
Thanks for the note. I will look into this issue and address it next week.
http://review.source.kitware.com/#/c/22567/
https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR/commit/3d9880d5f52c4c37e3b658abc607a13f3c3d9545
I will also create a Python package for the module.
Thanks,
Matt
_____________________________________
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:
http://public.kitware.com/ma
Andras Lasso
2017-09-08 18:55:17 UTC
Permalink
FYI, a few weeks ago we added a nice 4D (3D+t) image registration extension to 3D Slicer. It works very well for cardiac volume sequences: it produces a motion-compensated volume sequence and a displacement field sequence.

Sequence Registration extension can be installed by a few clicks from the extension manager in recent 3D Slicer nightly versions. See more information and tutorial here: https://github.com/moselhy/SlicerSequenceRegistration

Andras

-----Original Message-----
From: Community [mailto:community-***@itk.org] On Behalf Of Matt McCormick
Sent: Friday, September 8, 2017 2:31 PM
To: thanos thanos <***@gmail.com>
Cc: insight-***@itk.org
Subject: Re: [ITK] [ITK-users] Cardiac Deformation using Segmentation and Registration of Ultrasound Images

Hello Thanos,

Yes, to add support for additional image formats, add the corresponding ITK module to the find_package(ITK COMPONENTS ... call:

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FInsightSoftwareConsortium%2FITKAnisotropicDiffusionLBR%2Fblob%2F50acf46da9fa1480eb502a0bb550c36d518893eb%2Fexamples%2FCMakeLists.txt%23L8&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=Vqviuh1be7etykTVE1mHIBzmrdv40KfVrsyinYJUKNw%3D&reserved=0


Thank you for the suggested correction to the usage documentation. It is added here:

https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FInsightSoftwareConsortium%2FITKAnisotropicDiffusionLBR%2Fpull%2F12&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=uZf%2FlQ0EGne0tyyx6v58G%2Bqhh8jKJMgXE%2FYenk%2F4wls%3D&reserved=0


A Python package is now available for the module. It can be installed via

python -m pip install --upgrade pip
python -m pip install itk-anisotropicdiffusionlbr



Thanks,
Matt
Post by thanos thanos
Hello again,
Matt, thank you for solving the example issue. I tried to use the
filter and although it worked great for a 2D png image, it failed for
a 2D jpg and dicom images as well as for a 3D nrrd volume. I got the
error "Could not create ImageIO" so maybe that has to do with the ImageIOFactory.
I liked the suggested and accepted values when I run the .exe but
maybe to avoid confusion you could replace the "Weickert diffusion
type. Accepted values: Edge, Coherence. Default: Edge."
with
Weickert diffusion type. Accepted values: EED cEED CED cCED Isotropic"
Best regards,
Thanos
On Fri, Aug 11, 2017 at 6:55 PM, Matt McCormick
Post by Matt McCormick
On Fri, Aug 4, 2017 at 9:36 AM, Matt McCormick
Post by Matt McCormick
Hi Thanos,
On Thu, Aug 3, 2017 at 1:00 PM, thanos thanos
Hello everyone,
Dženan, Andras and Matt thank you very much for your answers.
To be honest I've tried already in the past registration with
Slicer using Demons, B-Splines and also Elastix and Plastimach.
Dženan, I read your last sentence already many times but I can't
really understand what you mean by "initializing registration of
time point
n+1 by
resulting transform from time point n."
Matt, thank you for sharing your thoughts. I already looked at the
AnisotropicDiffusionLBR paper and I have also tried the online
interactive figures
(https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Finsightsoftwareconsortium.github.io%2FITKAnisotropicDiffusionLBR%2F&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=CYJJaN1M6zQUHs9HAlWipN2PrWEZlTL%2Fx4Ad%2FLVZMxk%3D&reserved=0).
Seems to work nicely, but I wasn't sure how to build the project.
I already configured my ITK by setting the
Module_AnisotropicDiffusionLBR at the CMake and then I tried to
build the CoherenceEnhancingDiffusion from the
C:\ITK\src\Modules\Remote\AnisotropicDiffusionLBR\examples but I got "
No such file or directory " so I guess I am missing something..
Thanks for the note. I will look into this issue and address it next week.
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Frevie
w.source.kitware.com%2F%23%2Fc%2F22567%2F&data=02%7C01%7Classo%40quee
nsu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb28
38b925c%7C1%7C0%7C636404922819639139&sdata=XjWsPDq1Z%2BxvDcVUm9MFDDLa
BY%2BQHkuuuAgDhyKwQYg%3D&reserved=0
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
ub.com%2FInsightSoftwareConsortium%2FITKAnisotropicDiffusionLBR%2Fcom
mit%2F3d9880d5f52c4c37e3b658abc607a13f3c3d9545&data=02%7C01%7Classo%4
0queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4
efb2838b925c%7C1%7C0%7C636404922819639139&sdata=NN9XhKvMpJDHHL4DK1g2k
THZViGfwo6o%2B6wSOJAI7bo%3D&reserved=0
I will also create a Python package for the module.
Thanks,
Matt
_____________________________________
Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=eK3g%2BnV4Y1xllgOs7u8Wj3VJMHSVeOEKRmYkRWVgerY%3D&reserved=0

Visit other Kitware open-source projects at
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=pktiA7zEmkEVs33%2BkmjL2zGqnwb3QgiyljFcFVfNlGk%3D&reserved=0

Kitware offers ITK Training Courses, for more information visit:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fproducts%2Fprotraining.php&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=QPw5ZfDHLfSojDX%2FZa7xGaVVqahv0Sr9e0HXGp9nyHk%3D&reserved=0

Please keep messages on-topic and check the ITK FAQ at:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.itk.org%2FWiki%2FITK_FAQ&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=MSlPFevAsLgMK1h1RQKZ2Db8gVGQtcvanhoC%2Bhycpl4%3D&reserved=0

Follow this link to subscribe/unsubscribe:
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Finsight-users&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=291h4yTpF4VbYSsxzlVgZK2t5iFe0S2Tq6EOcwE2Y5Y%3D&reserved=0
_______________________________________________
Community mailing list
***@itk.org
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fcommunity&data=02%7C01%7Classo%40queensu.ca%7C3d7f50e0df534e04dfe708d4f6e7cd61%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636404922819639139&sdata=quNQl4jX7Mm1%2BnF1Mxgjln4W7oZAryrY5OSds3jButw%3D&reserved=0
_____________________________________
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:
http://public.kitware.com

Loading...