DGtal-team / DGtal

Digital Geometry Tools and Algorithm Library
https://dgtal.org
GNU Lesser General Public License v3.0
370 stars 115 forks source link

dicim reader test... #702

Closed kerautret closed 11 years ago

kerautret commented 11 years ago

The merge of the dicom reader was perhaps to fast:

kerautre:~/EnCours/DGtal/build[master⚡]$ ./tests/io/readers/testDicomReader New Block [Testing class DicomReader] Args: ./tests/io/readers/testDicomReader
[Image - STLVector] size=2130048 valuetype=1bytes Domain=[HyperRectDomain] = [[PointVector] {0, 0, 0}]x[[PointVector] {128, 127, 128}] Number of points with (val>0) = 2130048 WARNING: In /Users/kerautre/Dev/InsightToolkit-4.4.2/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx, line 114 GDCMSeriesFileNames (0x7fb854b00990): No Series can be found, make sure your restrictions are not too strong

[ERR]DicomReader: can't read /Users/kerautre/EnCours/DGtal/tests/samples Exception catched. Message : DGtal IO error Passed. EndBlock [Testing class DicomReader](1227.89 ms)

dcoeurjo commented 11 years ago

arg. I agree... the test returns a "0" but there is an exception fail.

I just ran a "make test" which didn't complain..

dcoeurjo commented 11 years ago

wait... it is normal. the test just checks that the exception is raised... no problem

kerautret commented 11 years ago

ok so just a warning, but the [ERR] is a little confusing

dcoeurjo commented 11 years ago

maybe.. but the test checks that the error is raised;)

kerautret commented 11 years ago

I see, it should be from: std::string filename = testPath + "samples/null.dcm"; Is it useful or null.dcm is missing ?

dcoeurjo commented 11 years ago

yes it is : if you want to test that the exception is raised, try to load a fake dicom image (non existing one). So the test is relevant.

kerautret commented 11 years ago

ha ok, with the filename print it could be less ambiguous if we don't check the source ;)

kerautret commented 11 years ago

I add it should be better now.

kerautret commented 11 years ago

I close it