jpr [Sun, 28 Aug 2005 17:10:49 +0000 (17:10 +0000)]
// ------------------------------------------------------------------------
// 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' ",
jpr [Thu, 25 Aug 2005 14:59:49 +0000 (14:59 +0000)]
Now Print displays the BinEntry Content (if it's printable, and loaded)
Usefull for a lot od Implicit VR 'Bin'Entry (if we knew there VR, they wouldn't
be Bin ...)
Appreciate the difference having a look at PrintFile result for
gdcmData/SIEMENS_MAGNETOM-12-MONO2-FileSeq0.dcm.
jpr [Tue, 23 Aug 2005 12:57:49 +0000 (12:57 +0000)]
Brutal patch, waiting till we find a clever way to guess
if a doc entry is a Sequence,
- when it's odd number
- and the file is Implicit VR Transfert Syntax
It solves temporarily some Philips Medical Systems image problems
jpr [Mon, 22 Aug 2005 12:30:36 +0000 (12:30 +0000)]
Replace
void SetCheckFileCoherenceLight();
by
vtkSetMacro(AllowLightChecking, int);
vtkGetMacro(AllowLightChecking, int);
vtkBooleanMacro(AllowLightChecking, int);
to be vtk compliant
vtkgdcmSerieViewer shows an example for using user supplied function.
(it uses now the Argument Manager)
vtkgdcmSerieViewer :
Display a Serie within a Directory
You can navigate through the stack by hitting any character key.
usage: vtkgdcmSerieViewer filein=fileName [noshadowseq][noshadow][noseq]
[reverse] [{[mirror]|[topdown]|[rotate]}]
[check][debug]
User is now allowed to pass a Pointer to a function of his own
to allow modification of pixel order (i.e. : Mirror, TopDown, )
to gdcm::FileHeleper, using SetUserFunction(userSuppliedFunction)
described as : void userSuppliedFunction(uint8_t *im, gdcm::File *f);
NB : the "uint8_t *" type of first param is just for prototyping.
User will Cast it according what he founds with f->GetPixelType()
See ctkgdcmSerieViewer for an example
BUG: Put back deprecated code since it makes the test pass. I believe the new approach is not working since the call are slightyl different wether you create a FileHelper with a filename or create a FileHelper and then set the filename it breaks everything...
AnonymizeNoLoad user can now ask for anonymization of 'BinEntries'
(e.g. Private entries when the TS is Implict VR)
AnonymizeNoLoad filein=... rubout=0x0009-0x0001,0x0013-0x1100
Thx to Luca Picello for reporting pb and supplying data to fix the bug.
Add ArgMgrGetXInt16Enum to decode from the command line pairs of unsigned int
16, written in hexadecimal.
(usefull to allow terminal user to pass the (private) elements he wants to
anonymize)