Closed kerautret closed 8 years ago
Hi @kerautret, does this bug still exist ? If it does, could you please add a test file demonstrating the wrong behavior ? Thanks
hello @dcoeurjo, I check it again ;) thank
Yes I confirm, the pb is always present, I don't remember where I get it, but I check it for instance on dicom2vol, on the master it works: kerautre:~/EnCours/DGtalTools/build[debugErr⚡]$ ./converters/dicom2vol -i ../../DGtal/tests/samples/dicomSample/1629.dcm -o tmp.vol Reading input dicom file ../../DGtal/tests/samples/dicomSample/1629.dcm [done] converting into vol file... [done] and by changing STLVector to STLMap: kerautre:~/EnCours/DGtalTools/build[debugErr⚡]$ 3dImageViewer -i tmp.vol Image loaded: [Image - STLVector] size=1 valuetype=1bytes Domain=[HyperRectDomain] = [[PointVector] {0, 0, 0}]x[[PointVector] {0, 0, 0}]
I put it to this branch if you want to test: https://github.com/kerautret/DGtalTools/tree/BugSTLMapDicomReader
I just encountered the same kind of problem with the importPGM reader :
typedef ImageContainerBySTLMap<Z2i::Domain, unsigned char> Image;
Image image = DGtal::PGMReader
Board2D board;
typedef GrayscaleColorMap
---> assertion fails
The good news is that it works if you use the GenericReader:
Image image = DGtal::GenericReader
Should be fixed by #1151. Is it the case ?
I look it ;)
Thanks!
yes all looks fine ! With dicom2vol compiled with STLMap:
./converters/dicom2vol -i ../../DGtal/tests/samples/dicomSample/1629.dcm -o tmp.vol Reading input dicom file ../../DGtal/tests/samples/dicomSample/1629.dcm [done] converting into vol file... [done] And the vol looks fine: ./visualisation/3dImageViewer -i tmp.vol --thresholdImage -m 0 -M 63 Image loaded: [Image - STLVector] size=2130048 valuetype=1bytes Domain=[HyperRectDomain] = [[PointVector] {0, 0, 0}]x[[PointVector] {128, 127, 128}]
Perfect. Merging.
Closing issue
When applying: typedef DGtal::ImageContainerBySTLMap<DGtal::Z3i::Domain, unsigned char> Image3D; typedef DGtal::RescalingFunctor<int ,unsigned char > RescalFCT;
Image3D imageVol = DicomReader< Image3D, RescalFCT >::importDicom(inputFilename, RescalFCT(-900, 530, 0, 255));
The resulting domain is totally wrong!... While replacing ImageContainerBySTLMap by ImageContainerBySTLVector it is ok !....