Program: gdcm
Module: $RCSfile: exReadWriteFile.cxx,v $
Language: C++
- Date: $Date: 2005/10/18 08:35:44 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2005/10/25 14:52:28 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// First, let's create a gdcm::File
// that will contain all the Dicom fields but the Pixels Element
- gdcm::File *f1= new gdcm::File( );
+ gdcm::File *f1= gdcm::File::New( );
f1->SetFileName( filename );
f1->Load();
gdcm::DataEntry *dataEntry;
std::string value;
- std::string vr; // value representation
+ gdcm::VRKey vr; // value representation
std::string vm; // value multiplicity
std::string name; // held in the Dicom Dictionary
// Hope now he knows enought about the image ;-)
// First, create a gdcm::FileHelper
- gdcm::FileHelper *fh1 = new gdcm::FileHelper(f1);
+ gdcm::FileHelper *fh1 = gdcm::FileHelper::New(f1);
// Load the pixels, transforms LUT (if any) into RGB Pixels
uint8_t *imageData = fh1->GetImageData();
// ------ User wants write a new image without shadow groups -------------
- gdcm::FileHelper *copy = new gdcm::FileHelper( );
+ gdcm::FileHelper *copy = gdcm::FileHelper::New( );
copy->SetFileName( output );
copy->Load();
std::cout << std::endl
<< "------------------------------------------------------------"
<< std::endl;
- delete f1;
- delete fh1;
- delete copy;
+ f1->Delete();
+ fh1->Delete();
+ copy->Delete();
exit (0);
}