4 int main(int argc, char* argv[])
11 std::cout << " usage : PrintDocument fileName" << std::endl;
17 fileName += GDCM_DATA_ROOT;
18 fileName += "/test.acr";
22 (fileName.c_str(),false, true);
24 f1 = new gdcmFile(e1);
30 std::cout << "\n\n" << std::endl;
32 int dataSize = f1->GetImageDataSize();
33 std::cout <<std::endl <<" dataSize " << dataSize << std::endl;
34 int nX,nY,nZ,sPP,planarConfig;
35 std::string pixelType;
39 std::cout << " DIMX=" << nX << " DIMY=" << nY << " DIMZ=" << nZ << std::endl;
41 pixelType = e1->GetPixelType();
42 sPP = e1->GetSamplesPerPixel();
43 planarConfig = e1->GetPlanarConfiguration();
45 std::cout << " pixelType=" << pixelType
46 << " SampleserPixel=" << sPP
47 << " PlanarConfiguration=" << planarConfig
49 << " PhotometricInterpretation="
50 << e1->GetEntryByNumber(0x0028,0x0004)
53 int numberOfScalarComponents=e1->GetNumberOfScalarComponents();
54 std::cout << " NumberOfScalarComponents " << numberOfScalarComponents <<std::endl;
56 std::string transferSyntaxName = e1->GetTransfertSyntaxName();
57 std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
59 if ( transferSyntaxName != "Implicit VR - Little Endian"
60 && transferSyntaxName != "Explicit VR - Little Endian"
61 && transferSyntaxName != "Deflated Explicit VR - Little Endian"
62 && transferSyntaxName != "Explicit VR - Big Endian"
63 && transferSyntaxName != "Uncompressed ACR-NEMA" )
65 std::cout << std::endl << "==========================================="
67 f1->ParsePixelData(); // gdcmFile Method :-(
68 std::cout << std::endl << "==========================================="
73 std::cout <<std::endl<<fileName<<" is Readable"<<std::endl;
75 std::cout <<std::endl<<fileName<<" is NOT Readable"<<std::endl;
76 std::cout<<std::flush;