X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FTestPapyrus.cxx;h=9d918d18cf906460a1587bb9f6912a23d43c09e5;hb=0ad9dae4659b21bfd5c834c1af724eab4dcdf4f6;hp=63ae5e048e17f88c145f60fa2e3b477253390149;hpb=c094e185dd6404df031524ccae8e1b51e3b84871;p=gdcm.git diff --git a/Example/TestPapyrus.cxx b/Example/TestPapyrus.cxx index 63ae5e04..9d918d18 100644 --- a/Example/TestPapyrus.cxx +++ b/Example/TestPapyrus.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestPapyrus.cxx,v $ Language: C++ - Date: $Date: 2005/01/21 11:40:52 $ - Version: $Revision: 1.5 $ + Date: $Date: 2005/01/23 10:12:32 $ + Version: $Revision: 1.6 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -96,7 +96,7 @@ int main(int argc, char* argv[]) // Look for private Papyrus Sequence gdcm::SeqEntry *seqPapyrus= h->GetSeqEntry(0x0041, 0x1050); - if (!h) + if (!seqPapyrus) { std::cout << "NOT a Papyrus File" << std::endl; delete h; @@ -165,12 +165,16 @@ int main(int argc, char* argv[]) int lgrImage = iRows*iColumns * iSamplesPerPixel * (iBitsAllocated/8); // compute number of images + + int nbImages = seqPapyrus->GetNumberOfSQItems(); +/* int nbImages = 0; while (sqi) { nbImages++; sqi = seqPapyrus->GetNextSQItem(); } +*/ std::cout <<"Number of frames :" << nbImages << std::endl; // allocate enough room to get the pixels of all images.