X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPcpdenseToDicom.cxx;h=a31c050bc51e6a34a3b91da865010e5bf60f9832;hb=e7a642c06e4cdcfdbaf024090754283ccc564408;hp=f9a818cf1983853e5b0ed8f1b34d45563b2a48cc;hpb=9d461db5c5d954548cd07d1fa095e9bad43a0cac;p=gdcm.git diff --git a/Example/PcpdenseToDicom.cxx b/Example/PcpdenseToDicom.cxx index f9a818cf..a31c050b 100644 --- a/Example/PcpdenseToDicom.cxx +++ b/Example/PcpdenseToDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PcpdenseToDicom.cxx,v $ Language: C++ - Date: $Date: 2008/09/08 08:10:33 $ - Version: $Revision: 1.2 $ + Date: $Date: 2011/03/29 07:35:57 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -37,8 +37,8 @@ * Hope they don't change soon! */ -void MakeDicomImage(unsigned short int *tabVal, int X, int Y, std::string dcmImageName, - const char * patientname, int nbFrames, std::string studyUID, std::string serieUID, std::string studyUID, int imgNum,bool m ); +void MakeDicomImage(unsigned short int *tabVal, int X, int Y, std::string dcmImageName, const char * patientName, int nbFrames, + std::string studyUID, std::string serieUID, std::string SerieDescr, int imgNum, bool m ); void LoadImage(std::ifstream &from, unsigned short int * ); @@ -48,10 +48,10 @@ bool verbose; int main(int argc, char *argv[]) { START_USAGE(usage) - " \n pcpdenseToDicom :\n ", + " \n pcpdenseToDicom :\n ", " Converts the '.txt' files into 16 bits Dicom Files, ", " usage: ", - " pcpdenseToDicom rootfilename=... ", + " pcpdenseToDicom rootfilename=... ", " (e.g.. : meas_MID380_DENSE_stacked_slices_aif_FID81637)", " numberOfSlices = (default : 3) ", " X2 : multiply x 2 image size ", @@ -154,7 +154,9 @@ int main(int argc, char *argv[]) // === Ecc === strSerieUID = GDCM_NAME_SPACE::Util::CreateUniqueUID(); - + + serieDescr = "Ecc"; + if (!multiframe) { for (int i=0; i> pixelValue; - image[i*NX+j] = (unsigned short int)(pixelValue * 1000.); + image[i*NX+j] = (unsigned short int)(pixelValue * 1000.); // Why do we multiply by 1000? // JPR } } @@ -404,7 +409,7 @@ XY Dimensions 47 50 for( i=0;i> pixelValue; - pixelValue*=1000.; + pixelValue*=1000.; // Why do we multiply by 1000? // JPR image[i*4*NX + j*2] = image[i*4*NX + j*2+1] = image[(i*4+2)*NX + j*2] = image[(i*4+2)*NX + j*2+1] = (unsigned short int)(pixelValue); } }