Thank you Stefan.. it seems to be a memory issue related to the fact that 32 bit processes has memory usage limitations. My OS is 64 bit, then I could extend those limitations without 4GT tuning by adding /LARGEADDRESSAWARE flag to CMAKE_EXE_LINKER_FLAGS. Could it be the same problem also in the Workbench ? I will try on more data set, but for this one - at least - the problem seems to be solved.

Thank you for your hints !

Paolo



Le 05/apr/2018 à 09:20, Dinkelacker, Stefan a écrit :

Hi, what are the dimensions and pixel type of your slices? Usually you need > 2x the size of RAM. But maybe you have something like a 4 GB restriction for processes depending on your OS? Have a look at the RAM consumption through the monitoring of your OS (task manager in Windows, system monitor in Linux). Does it really increases until it reaches the 32 GB?

Best,
Stefan

*From:*Paolo Cabras [mailto:cab...@unistra.fr]
*Sent:* Mittwoch, 4. April 2018 17:56
*To:* Goch, Caspar Jonas; mitk-users@lists.sourceforge.net
*Subject:* Re: [mitk-users] problem loading dicom

Hi Caspar,

thank you for the answer! I have tried with MITK workbench but I have the same problem and, unfortunately, it seems not due to a specific slice, but on the number of slices I load.

I tested what you suggested in my application with different consecutive slices and everything works fine in [case2] as far as I load less than 560 slices (with 567 it does not always work).

I tested the same thing with the MITK Workbench (with drag and drop): everything works if I load small volumes (<= 280 slices) but this is not the case If I try to load a bigger (even partial) volume (e.g.: the last 500 files or the first 300). In this last case, when selecting the MITK DICOM Reader from the pop-up menu, the same unknown error is returned; whereas, when selecting the "v2 (autoselect)" option the following message appears in the mbilog window:

875.18 core.mod.dicomReader.dicomSeriesreaderhelper ERROR: Out of memory. Cannot load DICOM series: e:\data_lib\mitk\bd-d\ep\include\itk-4.9\itkImportImageContainer.hxx:199: Failed to allocate memory for image.

Any advice (I have 32GB of RAM)? Thank you again!

Regards,

Paolo

Le 28/mar/2018 à 18:01, Goch, Caspar Jonas a écrit :

    Hi Paolo,

    Have you tried loading the same data set with a relatively current MITK 
build? If you drag and drop one of the files (a single file, not all of them, 
otherwise it might try loading it 602 times) and select one of the reader 
choices offered by the pop-up menu, what happens?

    If you load only the last 72 slices, does the same error happen (it might 
be a broken slice, so you could potentially narrow it down to a single file)?

    Best,

    Caspar

    -----Ursprüngliche Nachricht-----

    Von: Paolo Cabras [mailto:cab...@unistra.fr]

    Gesendet: Mittwoch, 28. März 2018 14:59

    An:mitk-users@lists.sourceforge.net
    <mailto:mitk-users@lists.sourceforge.net>

    Betreff: [mitk-users] problem loading dicom

    Hi everybody,

    I am quite new to MITK and I am trying to develop a standalone application 
that loads a set of dicom images and render it into a stdMultiWidget (the data 
set I am using is composed by 602 slice of

    512x512 pixels).

    I am using mitk::IOUtil::Load(myFilename, *myDataStorage) and, actually, 
everything works fine if [case1] myFilename is given as an argument to my 
program and I load the data before showing my QtMainWindow where the 
stdMultiWidget is included (exactly as it is done in Step8 of the mitk 
examples).

    However, it does not work, if [case2] I use the mitk::IOUtil::Load inside a 
callback function (a Qt slot) of a File menu action or a pushButton (in this 
case myFilename is a std::string hard-coded within the callback function). More 
precisely, in [case2] Load is not capable to load the entire 602 slices data 
set, but it does work if the input volume is reduced to the first 540 slices.

    I do not know if it can be useful, but I had a look at the memory usage of 
the process and in [case1] my application has a peak of used memory of about 
763.000 K during loading which comes back to 568.000 K after everything has 
been rendered. Whereas in [case2] (when trying to load the whole dataset) the 
memory usage increase till about 592.000 K before the MITK error is thrown. 
Here follows the log of the application with the mentioned error at the end 
(the error showed in the first line appears also in [case1], but in that case 
everything is correctly rendered afterwards):

    Wed Mar 28 13:07:27 2018

    7.94 core.mod.cest.customtagparser ERROR: Could not parse empty custom 
dicom string

    10.65 core.mod.core.dicomSeriesreaderSvc:

    --------------------------------------

    ------------------------------------------

    10.66 core.mod.core.dicomSeriesreaderSvc: DicomSeriesReader: Loading DICOM 
series 0: Series

    UID1.2.392.200036.9116.2.6.1.3268.2056440552.1512124464.240725

    10.66 core.mod.core.dicomSeriesreaderSvc:   607 'CT' files (CT Image

    Storage) loaded into 1 mitk::Image

    10.67 core.mod.core.dicomSeriesreaderSvc:   multi-frame: No

    10.67 core.mod.core.dicomSeriesreaderSvc:   reader support: Supported

    10.67 core.mod.core.dicomSeriesreaderSvc:   pixel spacing type: In Patient

    10.68 core.mod.core.dicomSeriesreaderSvc:   gantry tilt corrected: No

    10.68 core.mod.core.dicomSeriesreaderSvc:   3D+t: No

    10.68 core.mod.core.dicomSeriesreaderSvc:

    --------------------------------------

    ------------------------------------------

    20.29 core.mod.core.dicomSeriesreader ERROR: Error encountered when loading 
DICOM series:Unknown exception

    20.29 core.mod.core.dicomSeriesreaderSvc ERROR: DicomSeriesReader:

    Skipping series 0 due to some unspecified error...

    20.30 core.mod.core.ioUtil ERROR: Unknown read error occurred reading

    E:/Images/Cases/C/C0001

    Maybe I should use something as mitkDICOMITKSeriesGDCMReader ? The fact is 
that Load seems to recognize the volume, so I am not sure if the problem is the 
reader.

    Finally, some more details ...  I am using windows 7, mitk 2016.11 with Qt 
5.7.1 and compiling with msvc2013 32 bit.

    I hope I was able to explain the issue... any suggestion would be greatly 
appreciated!

    Best regards,

    --

    Paolo Cabras

    Research Engineer

    Automatic, Vision and Control Team

    ICUBE (UMR 7357 CNRS-Université de Strasbourg)

    
------------------------------------------------------------------------------

    Check out the vibrant tech community on one of the world's most

    engaging tech sites, Slashdot.org!http://sdm.link/slashdot

    _______________________________________________

    mitk-users mailing list

    mitk-users@lists.sourceforge.net
    <mailto:mitk-users@lists.sourceforge.net>

    https://lists.sourceforge.net/lists/listinfo/mitk-users

    ---

    This email has been checked for viruses by AVG.

    http://www.avg.com



--
Paolo Cabras
Research Engineer
Automatic, Vision and Control Team
ICUBE (UMR 7357 CNRS-Université de Strasbourg)
+33 (0) 3 88 11 90 68

<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Virus-free. www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

--
Paolo Cabras
Research Engineer
Automatic, Vision and Control Team
ICUBE (UMR 7357 CNRS-Université de Strasbourg)
+33 (0) 3 88 11 90 68

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to