1 /*
2  *
3  *  Copyright (C) 1998-2010, OFFIS e.V.
4  *  All rights reserved.  See COPYRIGHT file for details.
5  *
6  *  This software and supporting documentation were developed by
7  *
8  *    OFFIS e.V.
9  *    R&D Division Health
10  *    Escherweg 2
11  *    D-26121 Oldenburg, Germany
12  *
13  *
14  *  Module: dcmpstat
15  *
16  *  Author: Marco Eichelberg
17  *
18  *  Purpose:
19  *    enums: DVPSoverlayActivation, DVPSVOIActivation, DVPSGraphicLayering
20  *           DVPSPresentationLUTType, DVPSRotationType,
21  *           DVPSShutterType
22  *
23  */
24 
25 #ifndef DVPSTYP_H
26 #define DVPSTYP_H
27 
28 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
29 
30 #define INCLUDE_CSTDIO
31 #include "dcmtk/ofstd/ofstdinc.h"
32 
33 /** describes how to handle overlays when creating a default presentation state
34  *  for an image.
35  */
36 enum DVPSoverlayActivation
37 {
38   /** ignore overlays even if present in the image.
39    *  A presentation state without any embedded or activated overlays
40    *  is created.
41    */
42   DVPSO_ignoreOverlays,
43   /** if overlays are present in the image, activate but do not copy them.
44    *  If the image contains overlays, overlay activation elements are
45    *  created in the presentation state object. The overlays remain in the image.
46    */
47   DVPSO_referenceOverlays,
48   /** if overlays are present in the image, copy them.
49    *  If the image contains overlays which are not embedded in the pixel
50    *  data but use the OverlayData element, the overlays are copied to the
51    *  presentation state and activated.
52    *  Overlays that are embedded in the image pixel data are not copied
53    *  but also activated.
54    */
55   DVPSO_copyOverlays
56 };
57 
58 
59 /** describes how to handle VOI transformations when creating a default presentation state
60  *  for an image.
61  */
62 enum DVPSVOIActivation
63 {
64   /** ignore VOI transformations even if present in the image.
65    *  The presentation state will not contain any VOI transformation.
66    */
67   DVPSV_ignoreVOI,
68   /** select the first VOI window if present, VOI LUT alternatively.
69    *  If the image contains one or more settings for window center and
70    *  window width, the first window center/width is copied to the presentation
71    *  state. If the image contains no window center/width but does contain
72    *  one or more VOI LUTs, the first VOI LUT is copied to the presentation
73    *  state.
74    */
75   DVPSV_preferVOIWindow,
76   /** select the first VOI LUT if present, VOI Window alternatively.
77    *  If the image contains one or more VOI LUTs,
78    *  the first VOI LUT is copied to the presentation
79    *  state. If the image contains no VOI LUT but does contain
80    *  one or more settings for window center/width, the first
81    *  window center and width are copied to the presentation state.
82    */
83   DVPSV_preferVOILUT
84 };
85 
86 /** describes how to handle layering of curves and overlays
87  *  when creating a default presentation state for an image.
88  */
89 enum DVPSGraphicLayering
90 {
91   /** put all overlays and curves into a single graphic layer.
92    *  If curves and/or overlays are present, a single graphic layer is
93    *  created and all curves and overlays are assigned to this single layer.
94    */
95   DVPSG_oneLayer,
96   /** create one graphic layer for overlays and one graphic layer for curves on top of that.
97    *  If overlays are present, one layer containing all overlays is created.
98    *  If curves are present, a different layer containing all curves is created.
99    *  If both curves and overlays are present, the curves are assigned the higher layer order.
100    */
101   DVPSG_twoLayers,
102   /** create individual layers for each referenced element, curves on top of overlays.
103    *  For each overlay and curve present, a separate graphic layer is created.
104    *  The curve layers have higher order than the overlay layers.
105    */
106   DVPSG_separateLayers
107 };
108 
109 /** describes a type of presentation LUT that is currently
110  *  being used or set in a presentation state.
111  */
112 enum DVPSPresentationLUTType
113 {
114   /** Presentation LUT Shape with value 'IDENTITY'
115    */
116   DVPSP_identity,
117   /** Presentation LUT Shape with value 'INVERSE'
118    */
119   DVPSP_inverse,
120   /** Presentation LUT look up table
121    */
122   DVPSP_table,
123   /** Presentation LUT Shape with value 'LIN OD'
124    */
125   DVPSP_lin_od
126 
127 };
128 
129 /** some Print SCPs which support Presentation LUTs require that the number
130  *  of entries in a Presentation LUT matches the bit depth of the image pixel
131  *  data (4096 entries for 12 bit pixel data, 256 entries for 8 bit pixel
132  *  data). An instance of this enumeration describes the characteristics
133  *  of a Presentation LUT with regard to this matching rule.
134  */
135 enum DVPSPrintPresentationLUTAlignment
136 {
137   /** Presentation LUT Shape, matches all kinds of image data
138    */
139   DVPSK_shape,
140   /** Presentation LUT with 256 entries and first entry mapped to 0,
141    *  matches 8 bit image data
142    */
143   DVPSK_table8,
144   /** Presentation LUT with 4096 entries and first entry mapped to 0,
145    *  matches 12 bit image data
146    */
147   DVPSK_table12,
148   /** Presentation LUT Shape with number of entries other than 256 or 4096
149    *  or with first entry mapped to anything but 0.
150    */
151   DVPSK_other
152 };
153 
154 /** describes the rotation status of a presentation state.
155  */
156 enum DVPSRotationType
157 {
158   /** no rotation
159    */
160   DVPSR_0_deg,
161   /** rotation of 90 degrees
162    */
163   DVPSR_90_deg,
164   /** rotation of 180 degrees
165    */
166   DVPSR_180_deg,
167   /** rotation of 270 degrees
168    */
169   DVPSR_270_deg
170 };
171 
172 /** describes the different types of display shutters
173  */
174 enum DVPSShutterType
175 {
176   /** rectangular shutter
177    */
178   DVPSU_rectangular,
179   /** circular shutter
180    */
181   DVPSU_circular,
182   /** polygonal shutter
183    */
184   DVPSU_polygonal,
185   /** bitmap shutter
186    */
187   DVPSU_bitmap
188 };
189 
190 /** describes the different types of annotation units
191  */
192 enum DVPSannotationUnit
193 {
194   /** pixels
195    */
196   DVPSA_pixels,
197   /** fraction of specified display area
198    */
199   DVPSA_display
200 };
201 
202 /** describes the specific character set of a DICOM element.
203  *  The defined terms for code extension techniques are
204  *  not supported.
205  */
206 enum DVPScharacterSet
207 {
208   /** ISO 646 (ISO-IR 6): ASCII
209    */
210   DVPSC_ascii,
211   /** ISO-IR 100: Latin alphabet No. 1
212    */
213   DVPSC_latin1,
214   /** ISO-IR 101: Latin alphabet No. 2
215    */
216   DVPSC_latin2,
217   /** ISO-IR 109: Latin alphabet No. 3
218    */
219   DVPSC_latin3,
220   /** ISO-IR 110: Latin alphabet No. 4
221    */
222   DVPSC_latin4,
223   /** ISO-IR 148: Latin alphabet No. 5
224    */
225   DVPSC_latin5,
226   /** ISO-IR 144: Cyrillic
227    */
228   DVPSC_cyrillic,
229   /** ISO-IR 127: Arabic
230    */
231   DVPSC_arabic,
232   /** ISO-IR 126: Greek
233    */
234   DVPSC_greek,
235   /** ISO-IR 138: Hebrew
236    */
237   DVPSC_hebrew,
238   /** ISO-IR 13: Japanese (Katakana/Romaji)
239    */
240   DVPSC_japanese,
241   /** unrecognized term or code extension
242    */
243   DVPSC_other
244 };
245 
246 /** describes the different types of graphic objects
247  */
248 enum DVPSGraphicType
249 {
250   /** single point
251    */
252   DVPST_point,
253   /** non-interpolated polygonal line
254    */
255   DVPST_polyline,
256   /** interpolated polygonal line
257    */
258   DVPST_interpolated,
259   /** circle
260    */
261   DVPST_circle,
262   /** ellipse
263    */
264   DVPST_ellipse
265 };
266 
267 /** describes a curve type
268  */
269 enum DVPSCurveType
270 {
271   /** region of interest (ROI) - a closed polygonal line
272    */
273   DVPSL_roiCurve,
274   /** polyline - an open polygonal line
275    */
276   DVPSL_polylineCurve
277 };
278 
279 /** describes the horizontal justification of a text box
280  */
281 enum DVPSTextJustification
282 {
283   /** left justified text
284    */
285   DVPSX_left,
286   /** right justified text
287    */
288   DVPSX_right,
289   /** centered text
290    */
291   DVPSX_center
292 };
293 
294 /** describes the images and frames to which
295  *  an object (graphic layer, displayed area selection or VOI) is applicable
296  */
297 enum DVPSObjectApplicability
298 {
299   /** the object only applies to the current (selected) frame of the current (attached) image
300    */
301   DVPSB_currentFrame,
302   /** the object applies to all frames of the current (attached) image
303    */
304   DVPSB_currentImage,
305   /** the object applies to all frames of all referenced images
306    */
307   DVPSB_allImages
308 };
309 
310 /** describes the presentation size mode for a displayed area selection
311  */
312 enum DVPSPresentationSizeMode
313 {
314   /** the displayed area should be scaled to fill the screen
315    */
316   DVPSD_scaleToFit,
317   /** the displayed area should be scaled to its true physical size
318    */
319   DVPSD_trueSize,
320   /** the displayed area should be scaled to a fixed scaling factor
321    */
322   DVPSD_magnify
323 };
324 
325 /** describes the service type supported by a DICOM communication peer
326  */
327 enum DVPSPeerType
328 {
329   /** Storage SCP peer
330    */
331   DVPSE_storage,
332   /** local Storage SCP
333    */
334   DVPSE_receiver,
335   /** remote Print Management SCP
336    */
337   DVPSE_printRemote,
338   /** local Print Management SCP
339    */
340   DVPSE_printLocal,
341   /** local or remote Print Management SCP
342    */
343   DVPSE_printAny,
344   /** any type of peer
345    */
346   DVPSE_any
347 };
348 
349 /** describes the orientation (portrait or landscape) of a basic film box
350  */
351 enum DVPSFilmOrientation
352 {
353   /** portrait orientation
354    */
355   DVPSF_portrait,
356   /** landscape orientation
357    */
358   DVPSF_landscape,
359   /** printer default
360    */
361   DVPSF_default
362 };
363 
364 /** describes the trim mode (printing of borders around image boxes) for a basic film box
365  */
366 enum DVPSTrimMode
367 {
368   /** print with trims (borders)
369    */
370   DVPSH_trim_on,
371   /** print without trims (borders)
372    */
373   DVPSH_trim_off,
374   /** printer default
375    */
376   DVPSH_default
377 };
378 
379 /** describes the decimate/crop behaviour for a basic image box
380  */
381 enum DVPSDecimateCropBehaviour
382 {
383   /** a magnification factor less than one to be applied to the image.
384    */
385   DVPSI_decimate,
386   /** some image rows and/or columns are to be deleted before printing.
387    */
388   DVPSI_crop,
389   /** the SCP shall not crop or decimate
390    */
391   DVPSI_fail,
392   /** printer default
393    */
394   DVPSI_default
395 };
396 
397 /** describes the type of display function
398  */
399 enum DVPSDisplayTransform
400 {
401   /** first entry
402    */
403   DVPSD_first=0,
404   /** Grayscale Standard Display Function (defined in DICOM part 14)
405    */
406   DVPSD_GSDF=DVPSD_first,
407   /** CIE Lab
408    */
409   DVPSD_CIELAB=1,
410   /** no display transform
411    */
412   DVPSD_none=2,
413   /** number of display transforms
414    */
415   DVPSD_max=DVPSD_none
416 };
417 
418 /** describes the result of an association negotiation
419  */
420 enum DVPSAssociationNegotiationResult
421 {
422   /** negotiation was successful
423    */
424   DVPSJ_success,
425   /** negotiation was unsuccessful
426    */
427   DVPSJ_error,
428   /** peer requests termination of server process
429    */
430   DVPSJ_terminate
431 };
432 
433 /** describes the bit depth of a Basic Grayscale Image Box
434  */
435 enum DVPSImageDepth
436 {
437   /** not yet assigned
438    */
439   DVPSN_undefined,
440   /** 8 bit
441    */
442   DVPSN_8bit,
443   /** 12 bit
444    */
445   DVPSN_12bit
446 };
447 
448 /** describes the certificate verification policy for TLS association negotiation
449  */
450 enum DVPSCertificateVerificationType
451 {
452   /** verify peer certificate, refuse transmission if absent
453    */
454   DVPSQ_require,
455   /** verify peer certificate if present
456    */
457   DVPSQ_verify,
458   /** don't verify peer certificate
459    */
460   DVPSQ_ignore
461 };
462 
463 
464 /** describes the types of objects handled by the dcmpstat signature routines
465  */
466 enum DVPSObjectType
467 {
468   /** structured report
469    */
470   DVPSS_structuredReport,
471   /** image
472    */
473   DVPSS_image,
474   /** grayscale softcopy presentation state
475    */
476   DVPSS_presentationState
477 };
478 
479 
480 /** describes the types of objects handled by the dcmpstat signature routines
481  */
482 enum DVPSSignatureStatus
483 {
484   /** no digital signatures are present
485    */
486   DVPSW_unsigned,
487 
488   /** one or more digital signatures are present and have been successfully verified
489    */
490   DVPSW_signed_OK,
491 
492   /** one or more digital signatures are present, and all of them are valid.
493    *  However, at least one of them was created
494    *  with a certificate issued by an unknown CA.
495    */
496   DVPSW_signed_unknownCA,
497 
498   /** one or more digital signatures are present and at least one of them
499    *  could not be successfully verified because it was corrupt.
500    */
501   DVPSW_signed_corrupt
502 };
503 
504 
505 /** describes the mode to verify and sign structured reports
506  */
507 enum DVPSVerifyAndSignMode
508 {
509   /** verify the document only
510    */
511   DVPSY_verify,
512 
513   /** verify and digitally sign the document (apart from VerifyingObserver and SOPInstanceUID)
514    */
515   DVPSY_verifyAndSign,
516 
517   /** verify and digitally sign the entire document (finalize it)
518    */
519   DVPSY_verifyAndSign_finalize
520 };
521 
522 
523 #endif
524