]> Creatis software - gdcm.git/commit
// ------------------------------------------------------------------------
authorjpr <jpr>
Sun, 28 Aug 2005 17:10:49 +0000 (17:10 +0000)
committerjpr <jpr>
Sun, 28 Aug 2005 17:10:49 +0000 (17:10 +0000)
commit993bc33a54fcb6097d7f48488911881448c0194d
treefc42b6fbbce81685d382e27dd6b308803e2e6696
parentac113b082275780715dbd1605b2d7c873481eb9a
// ------------------------------------------------------------------------
// gdcm mechanisms don't allow user to read an image
// whose header contains wrong physical info (say : wrong Row Number ...)
// and re-write with a right value.
// This program does the job by brutally overwritting the wrong values.
// It may be usefull to save a set of images ...
// (It dosn't allow to *add* a missing field)
// ------------------------------------------------------------------------

   "\n PatchHeader :\n                                                        ",
   " Allows aware user to patch an image header, without loading image.       ",
   "         Warning : the image(s) is/are overwritten                        ",
   "                   to preserve image(s) integrity, use a copy.            ",
   "         WARNING : *NO CHECK* is performed on the new values.             ",
   "                   Use only if you are sure the original values are wrong ",
   "                   *and* your values are right...                         ",
   "usage: PatchHeader {filein=inputFileName|dirin=inputDirectoryName}        ",
   "               [ { [size=] | [rows=][columns=] } ] [planes=]              ",
   "               [bitsallocated=] [bitsstored=]                             ",
   "               [highbit=] [samplesperpixel=]                              ",
   "               [pixelrepresentation=] [samplesperpixel=]                  ",
   "               [ { [noshadowseq] | [noshadow][noseq] } ] [debug]          ",
   "                                                                          ",
   "       inputFileName : Name of the (single) file user wants to modify     ",
   "       inputDirectoryName : user wants to modify *all* the files          ",
   "                            within the directory                          ",
   "       size            : new (square) size, to owerwrite old (wrong) one  ",
   "         or                                                               ",
   "       rows            : new Rows number,    to owerwrite old (wrong) one ",
   "       columns         : new Columns number, to owerwrite old (wrong) one ",
   "       planes          : new Planes number,  ...                          ",
   "       bitsallocated   : new Bits Allocated number,  ...                  ",
   "       bitsstored      : new Bits Stored number,  ...                     ",
   "       highbit         : new High Bit number,  ...                        ",
   "       samplesperpixel : new Samples Per Pixel, ...                       ",
   "       pixelrepresentation : new Pixel Representation, ...                ",
   "                                                                          ",
   "       noshadowseq: user doesn't want to load Private Sequences           ",
   "       noshadow   : user doesn't want to load Private groups (odd number) ",
   "       noseq      : user doesn't want to load Sequences                   ",
   "       debug      : user wants to run the program in 'debug mode'         ",
Example/PatchHeader.cxx [new file with mode: 0644]