File: medcon.1

package info (click to toggle)
xmedcon 0.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 5,928 kB
  • ctags: 5,004
  • sloc: ansic: 47,536; sh: 13,052; makefile: 383
file content (750 lines) | stat: -rw-r--r-- 23,963 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
'\" t
.TH MEDCON 1
.SH NAME
medcon - MedCon conversion of medical image formats
.SH SYNOPSIS
.PP
.in 0.2i
.HP 7
.B medcon 
[options] \-f files ...
.PP
.br
.SH DESCRIPTION
.PP
.in 0.2i
.I MedCon 
is a conversion utility intended for reconstructed nuclear medical images.
.PP
.in 0.2i
The supported formats are:
.PP
.in 0.2i
.TS
center,tab(@);
c c s s s c
c c s s s c
l l s s s l.
Format@Explanation@Notation
------@-----------@--------
Ascii@Raw ascii  image arrays without header@'ascii'
Binary@Raw binary image arrays without header@'bin'
Gif89a@annimated GIF with colormap@'gif'
Acr/Nema@Papyrus, Siemens    (vers 2.0)@'acr'
INW@RUG local format (vers 1.0)@'inw'
ECAT@Siemens CTI ECAT 6@'ecat6' or 'ecat'
ECAT@Siemens CTI ECAT 7@'ecat7'
InterFile@version 3.3@'intf'
Analyze@with consideration to SPM software@'anlz'
DICOM@uses the VT-DICOM library@'dicom'
PNG@Portable Network Graphics@'png'
Concorde@Concorde/microPET@'conc'
NIfTI@Neuroimaging Informatics Technology Initiative@'nifti'
.TE
.PP
.in 0.2i
.SH FLAGS
.PP
.in 0.2i
.TP
.B \-f, \-\-file, \-\-files  <files> ...
Read a list of files.

.SH OPTIONS
.PP
.in 0.2i

.TP
.B \-8, \-\-indexed\-color
This color mode forces 24\-bit RGB color images being reduced to an 8-bit indexed colormap. For color reduction in combination with dithering see the \-dith option. 

.TP
.B \-24, \-\-true\-color
This color mode keeps a 24\-bit image as is.

.TP 
.B \-alias, \-\-alias\-naming
Generate filenames based on patient and study information. The syntax of the resulting basename is:

<patient_name>+<study_id>+<study_date>+<study_time>
              and 
  <series>+<acquisition>+<instance>

with the latter three id's applied in case the originating format is DICOM or Acr/Nema. See also \-noprefix. Since Analyze does not have a patient_name, patient_id is used instead.

.TP 
.B \-anon, \-\-anonymous
Make patient and study related entries anonymous (filled with 'X'). This option
can not be used with option \-ident.

.TP
.B \-b8, \-\-unsigned\-char
.TP
.B \-b16, \-\-signed\-short
.TP
.B \-b16.12 
Force writing of Uint8 or Int16 pixels. The special option \-b16.12 only uses 12 bits, as unsigned however. With these options one can lose the quantified float values when the new format doesn't support a global rescale factor or slope/intercept.

.TP
.B \-big, \-\-big\-endian
Force writing of big endian files when supported by the format.

.TP
.B \-byframe, \-\-sort\-by\-frame
Set sort order in ECAT by frames, instead of the default anatomical sort (based on slice location). Identical planes in each frame will be grouped together. You don't want this.

.TP
.B \-c, \-\-convert <format> ...
Convert with a list of formats to convert to. Use the notation without quotes as specified in the above table. You can not use this option with -p.

.TP
.B \-contrast, \-\-enable\-contrast
Apply (DICOM) window centre/width contrast remapping. Although this may improve the display of images, any manufacturer independent pixel values (like HU, SUV) with quantitation options \-qc or \-qs will be lost.

.TP
.B \-cor, \-\-coronal
Reslice the images of a volume into a coronal projection while preserving the real world dimensions. 

.TP
.B \-crop=<X>:<Y>:<W>:<H>, \-\-crop\-images=<X>:<Y>:<W>:<H>
This option allows one to crop an equal frame from all images at <X>:<Y> where width and height are <W>:<H>. The upper\-left corner of an image is at 0:0.

.TP
.B \-cs, \-\-cine\-sorting
Apply cine sorting, 1st image of each time frame, 2nd image of each time frame, 3rd image of each time frame, ... (applicable on gated SPECT). Reapplying does NOT undo this sorting. For this you need option \-cu.

.TP
.B \-cu, \-\-cine\-undo
Undo the cine sorting (as a result of the option \-cs).

.TP
.B \-cw=<centre>:<width>
Remap contrast using specified centre/width pair. No spaces are allowed within this option. See also \-contrast options.

.TP
.B \-d, \-\-debug
Show debug info. After reading a file, the program will display
the contents of the internal FILEINFO structure.

.TP
.B \-db
Only print main header of CTI ECAT files to standard output.

.TP
.B \-dith, \-\-dither\-color
Use dithering to improve quality of color reduction (from RGB to 8\-bit indexed).
.TP
.B \-e, \-\-extract [image ranges ...]
A routine to extract images interactively, unless you specify normal style image ranges directly on the command-line separated by spaces. In normal style it is also possible to reorder the sequence of images. You need to specify an output conversion format (see option \-c). Note that the extraction does NOT addapt the centre-centre slice separations. In other words, proper volume measurements could be lost.
.PP
.ti +1.2i
Selection Type?  1=normal    2=ecat
.PP
.ti +1.0i
Normal Style
.ti +1.0i
------------
.PP
.in 0.2i
.ti +0.8i
- Any number must be one-based (0 = All reversed)
.ti +0.8i
- Syntax of range   : X...Y or X-Y
.ti +0.8i
- Syntax of interval: X:S:Y    (S = step)
.ti +0.8i
- The list is sequence sensitive!
.PP
.ti +1.0i
Give a list of images to extract?
.PP
.ti +1.0i
Ecat Style
.ti +1.0i
----------
.PP
.in 0.2i
.ti +0.8i
- Any number must be one-based (0 = All)
.ti +0.8i
- Syntax of range   : X...Y or X-Y
.ti +0.8i
- Syntax of interval: X:S:Y    (S = step)
.PP
.ti +1.0i
Give planes list?
.ti +1.0i
Give frames list?
.ti +1.0i
Give gates  list?
.ti +1.0i
Give beds   list?

.TP
.B \-ean, \-\-echo\-alias\-name
A convenience function which quickly echoes the alias or human readable filename on screen, without any delay of image processing. For the syntax of this alias filename, see option \-alias. The output could then be used in a script, for example to make interpretable links towards cryptic numbered files resulting from a DICOM series.

.TP
.B \-fb\-none, \-\-without\-fallback
.TP
.B \-fb\-anlz, \-\-fallback\-analyze
.TP
.B \-fb\-conc, \-\-fallback\-concorde
.TP
.B \-fb\-dicom, \-\-fallback\-dicom
.TP
.B \-fb\-ecat, \-\-fallback\-ecat
Disable or specify a fallback read format in case autodetect failed.

.TP
.B \-fh, \-\-flip\-horizontal
.TP
.B \-fv, \-\-flip\-vertical
Flip images horizontal (\-fh) along the X\-axis, vertical (\-fv) along the Y-axis respectively. Parameters such as slice orientation are NOT changed. See also the \-rs option.

.TP
.B \-fmosaic=<W>x<H>x<N>, \-\-force\-mosaic=<W>x<H>x<N>
Enforce the mosaic file support for DICOM or Acr/Nema formats. The *stamps* will be split into separate slices according to the values supplied on the command-line. See also extra options \-interl and \-mfixv. The preset arguments are:
.PP
.ti +1.2i
<W> = pixel width  of image stamps (X)
.PP
.ti +1.2i
<H> = pixel height of image stamps (Y)
.PP
.ti +1.2i
<N> = total number of image stamps (Z)
.PP
.ti +1.2i
.B medcon \-f imagefile \-fmosaic=64x64x30

.TP
.B \-g, \-\-make\-gray
Remap coloured images to gray. This is necessary when you convert to formats
which only support a grayscale colormap!

.TP
.B \-gap, \-\-spacing\-true\-gap
The spacing between slices is the true gap/overlap between adjacent slices. In contrary to the default behaviour where the spacing between slices is measured from the centre to centre of two adjacent slices (including gap/overlap). Applied in DICOM & Acr/Nema.

.TP
.B \-hackacr, \-\-hack\-acrtags
Enables you to hack a file that contains Acr/Nema tags hidden somewhere.
Some proprietary image formats do contain tags but are placed after some
unknown headerinformation. This option will try to find some readable
tags in the first 2048 bytes after which it will give some possible hints
to get the images out of the file with the use of the interactive reading
procedure (see option `\-i'). This experimental procedure can
fail badly ...

.TP
.B \-i, \-\-interactive
Selects the interactive reading procedure. Normally the program automatically
detects the format or uses 'ecat' (or 'dicom') as default. With the interactive procedure it could be possible to read an uncompressed, unsupported format by answering the following questions:
.PP
.in 0.2i
.ti +0.8i
Number of images?
.ti +0.8i
General header offset to binary data?
.ti +0.8i
Image   header offset to binary data?
.ti +0.8i
Image   header repeated before each image?
.ti +0.8i
Swap the pixel bytes?
.ti +0.8i
Same characteristics for all images?
.ti +0.8i
Absolute offset in bytes? (overrides above, 0 = unused)
.ti +0.8i
Image columns?
.ti +0.8i
Image rows?
.ti +0.8i
Pixel data type?
.ti +0.8i
Redo input?
.PP
The GUI allows one to save such raw predef input (RPI) files, that can be used in a redirect statement:
.PP
.in 1.0i
.B medcon \-f unsupported.img \-c intf \-i < predef.rpi
.PP
Doing so you can create small scripts that will read and convert your unsupported images at once.

.TP
.B \-ident, \-\-identify
An interactive routine to specify the patient and study related information.
This option can not be used with the option -anon.  The questions asked are:

.PP
.in 0.2i
.ti +0.8i
Give patient name?
.ti +0.8i
Give patient id?
.ti +0.8i
Select patient sex?
.ti +0.8i
Give study description?
.ti +0.8i
Give study id/name/p-number?
.ti +0.8i
Give series description?

.TP
.B \-implicit, \-\-write\-implicit
Another DICOM related option to enforce the implicit VR little transfer 
syntax as output, instead of the default explicit transfer syntax.

.TP
.B \-interl, \-\-mosaic\-interlaced
An extra option used in combination with forced mosaic (\-fmosaic). The option 
indicates that the slices in the original mosaic are in fact interlaced.
See also options \-fmosaic and \-mfixv.

.TP
.B \-little, \-\-little\-endian
Force writing of little endian files when supported by the format.

.TP
.B \-lut, \-\-load\-lut <filename>
Load an external LUT color scheme.

.TP
.B \-mh, \-\-map\-hotmetal
Selects the hotmetal colormap. This is only useful to GIF89a or PNG.

.TP
.B \-mr, \-\-map\-rainbow
Selects the rainbow  colormap. This is only useful to GIF89a or PNG.

.TP
.B \-mc, \-\-map\-combined
Selects the combined colormap. This is only useful to GIF89a or PNG.

.TP
.B \-mi, \-\-map\-inverted
Selects the invers   colormap. This is only useful to GIF89a or PNG

.TP
.B \-mfixv, \-\-mosaic\-fix\-voxel
Another extra option used in combination with forced mosaic (\-fmosaic). Choosing
this options will rescale the real world voxel dimensions by the mosaic factor.
See also \-fmosaic and \-interl.

.TP
.B \-mosaic, \-\-enable\-mosaic
Enable mosaic file support in DICOM or Acr/Nema format. The *stamps* will be splitted into separate slices according to values found in the file. This autodetect routine will always fix the voxel sizes. To support other type of mosaic files, see option \-fmosaic.

.TP
.B \-n, \-\-negatives
Preserve negative values. When not selected, all negative
values are put to zero. In combination with quantitation (see \-qs or \-qc) 
the requested format must support pixels of type float, a global rescale
factor or the more generic slope/intercept concept in order to preserve
the (negative and positive) quantified values.

.TP
.B \-nf, \-\-norm\-over\-frames
Normalize with minimum/maximum values found over images in a frame group 
(in case the original format has different frames). The default behaviour
is normalization with minimum/maximum values found over all images.
This can be important when the requested format requires a rescaling 
to a new pixeltype. The original pixel values then need to be rescaled 
to the new pixeltype boundaries based on the minimum/maximum values.

.TP
.B \-nometa, \-\-write\-without\-meta
Write DICOM files without the part 10 meta header (group 0x0002).

.TP
.B \-nopath, \-\-ignore\-path
Ignore absolute path mentioned in the "name of data file" key of an interfile header. Do make sure then that the data file resides in the same directory as the header file.

.TP
.B \-noprefix, \-\-without\-prefix
This option disables the numbered prefix in the output filename. In combination with the -alias option, one could create human readable and alphabetical sorted files from DICOM or Acr/Name multiple file volumes.

.TP
.B \-o, \-\-output\-name <filename>
Changes output filename for ALL files to be created. It is allowed to specify a full directory path as well. However, a full path disables unique filename prefixing.

.TP
.B \-one, \-\-single\-file
Write header and image to same file; as allowed for InterFile.

.TP
.B \-optgif, \-\-options-gif
Define some GIF options when converting to the GIF format. Without this option
a loop and background color are defined by default. This interactive routine
asks the following questions:
.PP
.in 0.2i
.ti +0.8i
Select color map?
.ti +0.8i
Insert a display loop?
.ti +0.8i
Delay 1/100ths of a second?
.ti +0.8i
Insert a transparent color?
.ti +0.8i
Transparent color?
.ti +0.8i
Background  color?
.PP
.in 0.2i

.TP
.B \-optspm, \-\-options\-spm
Define some SPM options (origins) when converting to the Analyze format. The quantification is not set. See also '\-spm' & '\-ar'. The interactive routine asks the following questions:
.PP
.in 0.2i
.ti +0.8i
Origin X?
.ti +0.8i
Origin Y?
.ti +0.8i
Origin Z?
.PP

.TP
.B \-p, \-\-print-values
Show some specified pixel values. This is an interactive routine. Calibration and negative pixels are preserved automatically. You need to specify the \-qs to preserve the quantification instead of the calibration. You can not use this option with \-c. See also \-pa option for a non-interactive routine.
.PP
.in 0.2i
.ti +0.8i
- Any number must be one-based (0 = All)
.ti +0.8i
- Syntax of range   : X...Y or X-Y
.ti +0.8i
- Syntax of interval: X:S:Y    (S = step)
.PP
.ti +1.2i
Selection Type?  1=normal    2=ecat 
.PP
.ti +1.0i
Normal Style 
.ti +1.0i
------------
.PP
.ti +1.2i
Give a list of image numbers?
.ti +1.2i
Give a list of pixels x,y ? 
.PP
.ti +1.0i
Ecat Style
.ti +1.0i
----------
.PP
.ti +1.2i
Give planes list?
.ti +1.2i
Give frames list?
.ti +1.2i
Give gates  list?
.ti +1.2i
Give beds   list?
.ti +1.2i
Give a list of pixels x,y ?

.TP
.B \-pa, \-\-print\-all\-values
Show all pixel values. This option is identical to -p, but doesn't require user input.

.TP
.B \-pad, \-\-pad\-around
.TP
.B \-padtl, \-\-pad\-top\-left
.TP
.B \-padbr, \-\-pad\-bottom\-right
Increasing the slice matrix is done by padding an image with the lowest pixel value. The options above enable different padding modes.

.TP
.B \-preacq, \-\-prefix\-acquisition
.TP
.B \-preser, \-\-prefix\-series
Respectivily use acquisition or series value in the numbered prefix of the new filename. This is useful for alphabetical file ordering, where leading zeros in DICOM elements are missing. See also \-alias.

.TP
.B \-q, \-\-quantitation
Enable quantitation using all scale factors (for now alias for -qc option).

.TP
.B \-qs, \-\-quantification
A first scaling option to preserve the (ECAT) quantification (a) or to consider a first linear scaling slope with intercept (b).
.PP
.in 1.0i
qpv = ppv * quant_scale   [counts/second/pixel] (a)
.in 1.0i
qpv = ppv * slope + intercept (b)
.PP
.PP
.in 1.0i
qpv = quantified pixel value
.in 1.0i
ppv = plain pixel value
.PP
The "quant_scale" factor normalizes all images in the file; quite important for merging purposes. When the corresponding format can not hold a rescale factor for each image, the quantified values are saved as floats. Therefore, the highest pixel precision for correct quantitation is float, not double!
.PP
If the format does not support floats, the quantified pixel values get rescaled to an integer. Then only formats that support a global scaling factor or slope/intercept pair will preserve those quantified values.
.PP
Note that this option can not be used with \-qc.

.PP
.TP
.B \-qc, \-\-calibration
A second quantitation option to preserve the (ECAT) quantification as well as the (ECAT) calibration (a) or in general, using two rescale slopes with an intercept (b). These should normally transform pixels into manufacturer independent values. So one can assume that after a calibration, the new pixels will represent a real world unit (like concentration values (SUV), hounsfield units (HU) and alike).

.PP
.in 1.0i
cpv = ppv * quant_scale * calibr_fctr  [uCi/ml] (a)
.in 1.0i
cpv = ppv * slope1 * slope2 + intercept (b)
.PP
.PP
.in 1.0i
cpv = calibrated pixel value
.in 1.0i
ppv = plain pixel value
.in 1.0i
qpv = quantified pixel value = ppv * quant_scale
.PP
The "quant_scale" factor normalizes all images in the file; quite important for merging purposes. The "calibr_fctr" rescales the qpv-values to a new unit. When the corresponding format can not hold a compound factor for each image, the quantified values will be saved as floats. Therefore, the highest pixel precision for correct quantitation is float and not double!
.PP
If the format does not support floats, the calibrated pixel values are rescaled to an integer type. Only formats that support a global scaling factor or slope/intercept pair preserve those calibrated values.

.PP
Note that this option can not be used with \-qs.

.TP
.B \-r, \-\-rename\-file
Rename the file basename. This option is only useful in case of conversion.

.TP
.B \-rs, \-\-reverse\-slices
Reverse all the slices along the Z\-axis. Parameters such as slice orientation are NOT changed. See also the \-fh and \-fv options.

.TP
.B \-s, \-\-silent
Suppress all message, warning and error dialogs.

.TP
.B \-sag, \-\-sagittal
Reslice the images of a volume into a sagittal projection while preserving the real world dimensions.

.TP
.B \-si=<slope>:<intercept>
Force remap of pixel values using specified slope/intercept (y = s*x + i). The quantitation option \-qc is enabled by default. No spaces are allowed within this option.

.TP
.B \-skip1, \-\-skip\-preview\-slice
Skip the first image in an InterFile. In other words, the first image in the array will simply be ignored. Use this only when you are sure that the InterFile does contain an annoying/confusing preview slice.

.TP
.B \-split4d, \-splitf, \-\-split\-frames
.TP
.B \-split3d, \-splits, \-\-split\-slices
Write out a study into separate files, one for each volume in a time frame (--split-frames) or each image slice (--split-slices) individually. The names of the files created will have an extra index number. See also -stack3d and -stack4d as opposite options. 
 
.TP
.B \-spm, \-\-analyze\-spm
Considering Analyze files for/from SPM. In this case the global scaling factor hidden in imd.funused[1] will be used, as well as the hidden offset value in imd.funused[0].
.PP
In case of quantitation, the default output pixel type is float. This option allows one to write integers combined with a global scale factor. To actually use this scaling factor, you must select a quantitation option like \-qs or \-qc as well.
.PP
See also \-ar & \-optspm.

.TP
.B \-sqr, \-\-make\-square
Make all image matrices square, using the largest dimension. Images are padded with the lowest pixel value. See also \-pad related options.

.TP
.B \-sqr2, \-\-make\-square\-two
Make all image matrices square, using the nearest power of two (between 64, 128, 256, 512 and 1024). Images are padded with the lowest pixel value. See also \-pad related options.

.TP
.B \-stack4d, \-stackf, \-\-stack\-frames
.TP
.B \-stack3d, \-stacks, \-\-stack\-slices
Write separate studies into one file. The \-\-stack\-slices option allows one to write single image slice files into one 3D volume, while the \-\-stack\-frames option allows volumes of different time frames being written into one 4D file. The sequence of stacking is based on the file sequence given at the argument line. See also \-split3d and \-split4d as the opposite options.

.TP
.B \-tra, \-\-transverse
Reslice the images of a volume into a transverse projection while preserving the real world dimensions.

.TP
.B \-uin, \-\-use\-institution\-name <namestring>
Change the program's default institution name which is applied on studies without one. However, this does
.B not
override existing values. For a namestring with spaces, group between double quotes.

.TP
.B \-v, \-\-verbose
Verbose mode. Show some explaining messages during the reading 
and writing of files.

.TP
.B \-vifi, \-\-edit\-fileinfo
An interactive routine for editing voxel,array,slice and orient related entries in the FILEINFO struct. 

.TP
.B \-w, \-\-overwrite\-files
Allow overwrite of existing files, without warning.

.in 0.2i
.SH NOTES
.PP
.in 0.2i
When no conversion was specified, the program will display the header information of each image.
.PP
.in 0.2i
When conversion was specified, the program will automatically create new filenames in the 
.B current directory 
with the following syntax:
.PP
.in 0.2i
.ce 1
mXXX-filename.ext 
.PP
.in 0.2i
.ce 2
\`XXX-' a number representing the XXX-th conversion
.br
\`ext' a corresponding extension of the new format
.br
.PP
.in 0.2i
.TS
center,tab(@);
l c l.
Binary raw@->@.bin
Ascii  raw@->@.asc
Gif89a@->@.gif
Acr/Nema@->@.ima
INW@->@.im
ECAT@->@.img
Interfile@->@.h33 + .i33
Analyze@->@.hdr + .img
DICOM@->@.dcm
PNG@->@.png
CONC@->@.hdr + .dat
.TE
.PP
.in 0.2i
Some special remarks related to reading from stdin or writing to stdout.
.PP
.in 0.5i
.B a) reading from stdin:
.PP
Enable this by using an "-" mark instead of the list of input files.
.PP
.in 1.0i
1. redirect: 
.B medcon \-f - < inputfile
.PP
This is supported for all formats and shouldn't cause any particular problems. Interactive routines are disabled because stdin is now in use by the image input.
.PP
.in 1.0i
2. pipes   :
.B cat inputfile | medcon \-f - format
.PP
Actually, this way only one or two formats are supported since seek() calls are not possible during pipes. The fact is that most of our formats are read using those seek() calls. In normal operation we already need a quick sneak in the file to determine the format. Because this fseek() isn't allowed, you must supply at least the input format too.
.PP
.in 0.5i
.B b) writing to stdout:
.PP
Enabled by using an extra "-" mark on the conversion list.
.PP
.in 1.0i
.B medcon \-f inputfile \-c - format
.PP
Only one inputfile is allowed. The converted output will be send to stdout.
.PP
In case of dual file formats such as Analyze or InterFile, the header information will be send to stderr. The reference to the image file in the header of an InterFile will ofcourse be wrong (since the program is not capable of knowing the resulting filename).
.PP
In case of RAW or ASCII output, the program will print the content of the internal FILEINFO struct to stderr as well. Please note that the (t)csh shells do not allow to catch stderr or stdout separately. In case of the bash shell, it is possible to say:
.PP
.B medcon \-f inputfile \-c - intf \-b16.12 \-qc   1>image  2>header
.PP
.in 0.2i
.SH EXAMPLES
.PP
.in 0.2i
.B 1. 
To display the image headers:
.ti +1.0i
medcon \-f filename1 filename2
.PP
.in 0.2i
.B 2.
To convert the images:
.ti +1.0i
medcon \-f filename1 filename2 \-c gif acr intf
.PP
.in 0.2i
.B 3.
To read interactively
.ti +1.0i
medcon \-i \-f filename \-c ecat
.PP
.in 0.2i
.B 4.
To extract alternate images:
.ti +1.0i
medcon \-e 1:2:20 \-f filename \-c gif
.PP
.in 0.2i
.B 5.
To print out pixel values
.ti +1.0i
medcon \-p \-f filename 
.PP
.in 0.2i
.B 6.
Convert to raw binary images, send to standard output:
.ti +1.0i
medcon \-f filename \-c - bin
.PP
.in 0.2i
.SH FILES
.PP
.in 0.2i
.TS
tab(@);
l l.
/usr/local/xmedcon/include/@Directory with header files.
/usr/local/xmedcon/lib/@Directory with libraries.
/usr/local/xmedcon/bin/@Directory with executables.
/usr/local/xmedcon/man/@Directory with man-pages.
/usr/local/xmedcon/etc/@Directory with rcfiles.
.TE
.PP
.in 0.2i
.SH SEE ALSO
.PP
.in 0.2i
xmedcon(1), xmedcon-config(1)
.PP
.in 0.2i
m-acr(4), m-anlz(4), m-gif(4), m-inw(4), m-intf(4), m-ecat(4)
.PP
.in 0.2i
medcon(3)
.PP
.in 0.2i
.SH AUTHOR
.PP
.in 0.2i
.I (X)MedCon
project was originally written by Erik Nolf (eNlf) for the former PET-Centre at Ghent University (Belgium).
.PP
.in 0.2i
.TS
tab(=);
lB l lB l.
e-mail:=enlf-at-users.sourceforge.net=www:=http://xmedcon.sourceforge.net
.TE