- gdcm::File file;
- // Do not test unknow VM ...
- file.SetLoadMode( gdcm::LD_NOSHADOW | gdcm::LD_NOSHADOWSEQ );
- file.SetFileName( filename );
- if( !file.Load() ) //would be really bad...
- return 1;
+ gdcm::File *file = gdcm::File::New();
+ // - Do not test unknow VM in shadow groups (if element 0x0000 is present)
+ // - Skip Sequences (if they are 'True Length'); loading will be quicker
+ // (anyway, Sequences are skipped at processing time ...)
+ file->SetLoadMode( gdcm::LD_NOSHADOW | gdcm::LD_NOSEQ );
+
+ file->SetFileName( filename );
+ if( !file->Load() ) //would be really bad...
+ return 1;