#include <iostream>
+#include "gdcm.h"
-#include "gdcmException.h"
-#include "gdcmCommon.h"
-
-#include "gdcmDictEntry.h"
-#include "gdcmDict.h"
-#include "gdcmDictSet.h"
-#include "gdcmHeader.h"
-#include "gdcmUtil.h"
-#include "gdcmBinEntry.h"
-#include "gdcmDocEntry.h"
-#include "gdcmDocEntrySet.h"
-#include "gdcmDocument.h"
-#include "gdcmElementSet.h"
-#include "gdcmSeqEntry.h"
-#include "gdcmSQItem.h"
-#include "gdcmValEntry.h"
-#include "gdcmFile.h"
int main(int argc, char* argv[])
{
fileName += "/test.acr";
}
- e1= new gdcmHeader
- (fileName.c_str(),false, true);
+ e1= new gdcmHeader( fileName.c_str() );
f1 = new gdcmFile(e1);
int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
std::cout << " NumberOfScalarComponents " << numberOfScalarComponents <<std::endl;
+
+ if ( e1->GetEntryByNumber(0x0002,0x0010) == GDCM_NOTLOADED ) {
+ std::cout << "Transfert Syntax not loaded. " << std::endl
+ << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
+ << std::endl;
+ return 0;
+ }
+
std::string transferSyntaxName = e1->GetTransfertSyntaxName();
std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
{
std::cout << std::endl << "==========================================="
<< std::endl;
- f1->ParsePixelData(); // gdcmFile Method :-(
+ f1->ParsePixelData();
std::cout << std::endl << "==========================================="
<< std::endl;
}