resolved bug, ITK-Snap can now open large images (> 4GB)

76 views
Skip to first unread message

Grothausmann, Roman Dr.

unread,
Jun 16, 2015, 10:04:18 AM6/16/15
to itksna...@googlegroups.com, itksn...@googlegroups.com
Dear mailing list members,


ITK-Snap crashed when opening large datasets. It seems this was caused by an
integer overflow when calculating a pointer index. The function used dot_product
from VNL, which does not check for overflows
(http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h;h=04f930ef05bb49036e1fa69d6fe9ae9a697e2d45;hb=HEAD#l189).
Doing the calculation avoiding VNL allows to use a simple cast to size_t before
multiplication.
This solved the issue for me. I can now load a grey image of about 10GB plus a
40GB segmentation into ITK-Snap, modify it (even in gWS mode) and then render
the segmentation without any problems.
The fix can be found at:
https://github.com/pyushkevich/itksnap/pull/2

HTH
Roman

--
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-2900

Paul Yushkevich

unread,
Jun 17, 2015, 6:15:03 AM6/17/15
to Dzenan Zukic, itksn...@googlegroups.com, itksna...@googlegroups.com
Hi Roman

Thanks so much for this fix! I am committing now to the master branch (which will become the next release, 3.4)

Thanks!
Paul

On Tue, Jun 16, 2015 at 5:22 PM, Dzenan Zukic <dzenan...@kitware.com> wrote:
Dear Roman,

calculating the start voxel is a once per thread operation, which makes its speed negligible. The pull request should be merged.

Paul? Will you do it?

Regards

--
You received this message because you are subscribed to the Google Groups "itksnap-developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-dev...@googlegroups.com.
To post to this group, send email to itksn...@googlegroups.com.
Visit this group at http://groups.google.com/group/itksnap-dev.
For more options, visit https://groups.google.com/d/optout.



--
Dženan Zukić, R&D Engineer, Kitware (Carrboro, NC Office)



--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Grothausmann, Roman Dr.

unread,
Jun 19, 2015, 8:33:50 AM6/19/15
to Dzenan Zukic, Paul Yushkevich, itksn...@googlegroups.com
Dear Dzenan, dear Paul,


Thanks for looking at the modifications. Even though I'm not new to ITK, VTK and
Co I still do not feel very confident in the quality of my changes when
contributing bug fixes or extensions. So I'm very grateful if someone else has a
look and approves;-)
I'm happy I finally could contribute something to ITK-Snap.

Thanks again
Roman

PS: Paul, would You push the commits You made also to github?


On 17/06/15 12:14, Paul Yushkevich wrote:
> Hi Roman
>
> Thanks so much for this fix! I am committing now to the master branch (which
> will become the next release, 3.4)
>
> Thanks!
> Paul
>
> On Tue, Jun 16, 2015 at 5:22 PM, Dzenan Zukic <dzenan...@kitware.com
> <mailto:dzenan...@kitware.com>> wrote:
>
> Dear Roman,
>
> calculating the start voxel is a once per thread operation, which makes its
> speed negligible. The pull request should be merged.
>
> Paul? Will you do it?
>
> Regards
>
> On Tue, Jun 16, 2015 at 10:04 AM, Grothausmann, Roman Dr.
> <grothausm...@mh-hannover.de
> <mailto:grothausm...@mh-hannover.de>> wrote:
>
> Dear mailing list members,
>
>
> ITK-Snap crashed when opening large datasets. It seems this was caused
> by an integer overflow when calculating a pointer index. The function
> used dot_product from VNL, which does not check for overflows
> (http://itk.org/gitweb?p=ITK.git;a=blob;f=Modules/ThirdParty/VNL/src/vxl/core/vnl/vnl_sse.h;h=04f930ef05bb49036e1fa69d6fe9ae9a697e2d45;hb=HEAD#l189).
> Doing the calculation avoiding VNL allows to use a simple cast to size_t
> before multiplication.
> This solved the issue for me. I can now load a grey image of about 10GB
> plus a 40GB segmentation into ITK-Snap, modify it (even in gWS mode) and
> then render the segmentation without any problems.
> The fix can be found at:
> https://github.com/pyushkevich/itksnap/pull/2
>
> HTH
> Roman
>
> --
> Dr. Roman Grothausmann
>
> Tomographie und Digitale Bildverarbeitung
> Tomography and Digital Image Analysis
>
> Institut für Funktionelle und Angewandte Anatomie, OE 4120
> Medizinische Hochschule Hannover
> Carl-Neuberg-Str. 1
> D-30625 Hannover
>
> Tel. +49 511 532-2900 <tel:%2B49%20511%20532-2900>
>
> --
> You received this message because you are subscribed to the Google
> Groups "itksnap-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to itksnap-dev...@googlegroups.com
> <mailto:itksnap-dev%2Bunsu...@googlegroups.com>.
> To post to this group, send email to itksn...@googlegroups.com
> <mailto:itksn...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/itksnap-dev.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Dženan Zukić, R&D Engineer, Kitware <http://www.kitware.com> (Carrboro, NC
> Office)
>
>
>
>
> --
> Paul A. Yushkevich, Ph.D.
> Associate Professor
> Penn Image Computing and Science Laboratory
> Department of Radiology
> University of Pennsylvania
>
> --
> You received this message because you are subscribed to the Google Groups
> "itksnap-developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to itksnap-dev...@googlegroups.com
> <mailto:itksnap-dev...@googlegroups.com>.
> To post to this group, send email to itksn...@googlegroups.com
> <mailto:itksn...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/itksnap-dev.
> For more options, visit https://groups.google.com/d/optout.

--

Paul Yushkevich

unread,
Jun 22, 2015, 4:55:41 AM6/22/15
to Grothausmann, Roman Dr., Dzenan Zukic, itksn...@googlegroups.com
Hi Roman

I pushed to github. I added it as a second repo for the folder where I do most development so it will be easier to do from time to time.

Thanks!
Paul

Paul Yushkevich

unread,
Mar 29, 2017, 5:19:48 AM3/29/17
to itksna...@googlegroups.com, itksn...@googlegroups.com, Dr. Roman Grothausmann
Hi JP

I've finally been able to track this down and I am working on a fix. I don't think earlier versions support >4GB images either on Windows. Will let you know when I have something that works.

Thanks
Paul

On Mon, Mar 20, 2017 at 1:12 PM, schnjph <sch...@gmail.com> wrote:
Dear all,

in the current version 3.6.0-rc1, ITK snap still crashes when I open large datasets. Is there a solution in the current version? Or should I downgrade to 3.4?
For details, please see my topic "large datasets".

Kind regards and thank you very much in advance.

JP

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-users+unsubscribe@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.

For more options, visit https://groups.google.com/d/optout.



--

Paul Yushkevich

unread,
Mar 29, 2017, 9:45:06 AM3/29/17
to itksna...@googlegroups.com, itksn...@googlegroups.com, Dr. Roman Grothausmann
Hi JP,

The fix was fairly simple - we have to set the following flag when building ITK on Windows 64bit systems:

ITK_USE_64BITS_IDS:BOOL=TRUE

Please try this binary and let me know if it works with large images


Thanks!
Paul

Paul Yushkevich

unread,
Jun 1, 2017, 7:10:19 AM6/1/17
to itksna...@googlegroups.com, itksn...@googlegroups.com, Dr. Roman Grothausmann
Could you please send me a dataset that is causing ITK-SNAP to crash? I have created some large files and have had no problems loading them, so it would be helpful to know exactly what data is causing this.

Thanks!
Paul.

On Fri, May 19, 2017 at 7:39 AM, schnjph <sch...@gmail.com> wrote:
Dear Paul,

do you have an idea meanwhile? Because otherwise I may have to change the segmentation software?
KR,
JP


Am Donnerstag, 20. April 2017 13:08:47 UTC+2 schrieb schnjph:
Dear Paul,

thank you very much. Unfortunately it still does not work (I have tried the file from your link). However, the loading process lasts longer now, but at the end it still crashes. It seems that the program crashes exactly in the moment when the program wants to display the image. I tried .analyze and .mha. Do you have any idea?

Kind regards, JP




Am Mittwoch, 29. März 2017 15:45:07 UTC+2 schrieb Paul Yushkevich:
Hi JP,

The fix was fairly simple - we have to set the following flag when building ITK on Windows 64bit systems:

ITK_USE_64BITS_IDS:BOOL=TRUE

Please try this binary and let me know if it works with large images


Thanks!
Paul
On Wed, Mar 29, 2017 at 5:19 AM, Paul Yushkevich <pyush...@gmail.com> wrote:
Hi JP

I've finally been able to track this down and I am working on a fix. I don't think earlier versions support >4GB images either on Windows. Will let you know when I have something that works.

Thanks
Paul
On Mon, Mar 20, 2017 at 1:12 PM, schnjph <sch...@gmail.com> wrote:
Dear all,

in the current version 3.6.0-rc1, ITK snap still crashes when I open large datasets. Is there a solution in the current version? Or should I downgrade to 3.4?
For details, please see my topic "large datasets".

Kind regards and thank you very much in advance.

JP

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages