Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "gdcmFile.h"
#include "gdcmFileHelper.h"
=========================================================================*/
#include "gdcmFile.h"
#include "gdcmFileHelper.h"
//////////////// Step 2:
GDCM_NAME_SPACE::FileHelper *filehelper = GDCM_NAME_SPACE::FileHelper::New( file );
int dataSize = filehelper->GetImageDataSize();
uint8_t *imageData = filehelper->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
// GetImageData or if he wants to GetImageDataRaw
//////////////// Step 2:
GDCM_NAME_SPACE::FileHelper *filehelper = GDCM_NAME_SPACE::FileHelper::New( file );
int dataSize = filehelper->GetImageDataSize();
uint8_t *imageData = filehelper->GetImageData(); //EXTREMELY IMPORTANT
// Sure, it is : It's up to the user to decide if he wants to
// GetImageData or if he wants to GetImageDataRaw
GDCM_NAME_SPACE::FileHelper *reread = GDCM_NAME_SPACE::FileHelper::New( fileout );
std::cout << "3...";
// For the next step:
int dataSizeWritten = reread->GetImageDataSize();
uint8_t *imageDataWritten = reread->GetImageData();
GDCM_NAME_SPACE::FileHelper *reread = GDCM_NAME_SPACE::FileHelper::New( fileout );
std::cout << "3...";
// For the next step:
int dataSizeWritten = reread->GetImageDataSize();
uint8_t *imageDataWritten = reread->GetImageData();
// beware of odd length Pixel Element!
int dataSizeFixed = dataSize + dataSize%2;
int dataSizeWrittenFixed = dataSizeWritten + dataSizeWritten%2;
// beware of odd length Pixel Element!
int dataSizeFixed = dataSize + dataSize%2;
int dataSizeWrittenFixed = dataSizeWritten + dataSizeWritten%2;