diff --git a/libsrc/ImageSEGConverter.cpp b/libsrc/ImageSEGConverter.cpp index 3e8bf992..dc6734e1 100644 --- a/libsrc/ImageSEGConverter.cpp +++ b/libsrc/ImageSEGConverter.cpp @@ -421,6 +421,10 @@ namespace dcmqi { CHECK_COND(segdoc->getFrameOfReference().setFrameOfReferenceUID(frameOfRefUIDchar)); } + // Don't check functional groups since its very time consuming and we trust + // ourselves to put together valid datasets + segdoc->setCheckFGOnWrite(OFFalse); + OFCondition writeResult = segdoc->writeDataset(segdocDataset); if(writeResult.bad()){ cerr << "FATAL ERROR: Writing of the SEG dataset failed!"; @@ -482,7 +486,7 @@ namespace dcmqi { pair , string> ImageSEGConverter::dcmSegmentation2itkimage(DcmDataset *segDataset) { DcmSegmentation *segdoc = NULL; - + DcmRLEDecoderRegistration::registerCodecs(); OFCondition cond = DcmSegmentation::loadDataset(*segDataset, segdoc); diff --git a/libsrc/ParaMapConverter.cpp b/libsrc/ParaMapConverter.cpp index a82ff317..ef8da16f 100644 --- a/libsrc/ParaMapConverter.cpp +++ b/libsrc/ParaMapConverter.cpp @@ -445,6 +445,10 @@ namespace dcmqi { pMapDoc->getSeries().setSeriesNumber(metaInfo.getSeriesNumber().c_str()); DcmDataset* output = new DcmDataset(); + + // Don't check functional groups since its very time consuming and we trust + // ourselves to put together valid datasets + pMapDoc->getFunctionalGroups().setCheckOnWrite(OFFalse); CHECK_COND(pMapDoc->writeDataset(*output)); return output; }