Mercurial > hg > orthanc-webviewer
comparison Orthanc/Core/Enumerations.h @ 172:330ecfd96aec
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Oct 2017 12:53:46 +0200 |
parents | f17ecfffdc75 |
children | dd1ad819ca33 |
comparison
equal
deleted
inserted
replaced
171:b6c55352818c | 172:330ecfd96aec |
---|---|
197 * {summary}{Graylevel, floating-point image.} | 197 * {summary}{Graylevel, floating-point image.} |
198 * {description}{The image is graylevel. Each pixel is floating-point and stored in 4 bytes.} | 198 * {description}{The image is graylevel. Each pixel is floating-point and stored in 4 bytes.} |
199 **/ | 199 **/ |
200 PixelFormat_Float32 = 6, | 200 PixelFormat_Float32 = 6, |
201 | 201 |
202 // This is the memory layout for Cairo | 202 // This is the memory layout for Cairo (for internal use in Stone of Orthanc) |
203 PixelFormat_BGRA32 = 7 | 203 PixelFormat_BGRA32 = 7, |
204 | |
205 /** | |
206 * {summary}{Graylevel, unsigned 32bpp image.} | |
207 * {description}{The image is graylevel. Each pixel is unsigned and stored in 4 bytes.} | |
208 **/ | |
209 PixelFormat_Grayscale32 = 8, | |
210 | |
211 /** | |
212 * {summary}{Color image in RGB48 format.} | |
213 * {description}{This format describes a color image. The pixels are stored in 6 | |
214 * consecutive bytes. The memory layout is RGB.} | |
215 **/ | |
216 PixelFormat_RGB48 = 9 | |
204 }; | 217 }; |
205 | 218 |
206 | 219 |
207 /** | 220 /** |
208 * {summary}{The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image.} | 221 * {summary}{The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image.} |
441 ValueRepresentation_UnsignedShort = 30, // US (uint16_t) | 454 ValueRepresentation_UnsignedShort = 30, // US (uint16_t) |
442 ValueRepresentation_UnlimitedText = 31, // UT | 455 ValueRepresentation_UnlimitedText = 31, // UT |
443 ValueRepresentation_NotSupported // Not supported by Orthanc, or tag not in dictionary | 456 ValueRepresentation_NotSupported // Not supported by Orthanc, or tag not in dictionary |
444 }; | 457 }; |
445 | 458 |
459 enum DicomReplaceMode | |
460 { | |
461 DicomReplaceMode_InsertIfAbsent, | |
462 DicomReplaceMode_ThrowIfAbsent, | |
463 DicomReplaceMode_IgnoreIfAbsent | |
464 }; | |
465 | |
466 enum DicomToJsonFormat | |
467 { | |
468 DicomToJsonFormat_Full, | |
469 DicomToJsonFormat_Short, | |
470 DicomToJsonFormat_Human | |
471 }; | |
472 | |
473 enum DicomToJsonFlags | |
474 { | |
475 DicomToJsonFlags_IncludeBinary = (1 << 0), | |
476 DicomToJsonFlags_IncludePrivateTags = (1 << 1), | |
477 DicomToJsonFlags_IncludeUnknownTags = (1 << 2), | |
478 DicomToJsonFlags_IncludePixelData = (1 << 3), | |
479 DicomToJsonFlags_ConvertBinaryToAscii = (1 << 4), | |
480 DicomToJsonFlags_ConvertBinaryToNull = (1 << 5), | |
481 | |
482 // Some predefined combinations | |
483 DicomToJsonFlags_None = 0, | |
484 DicomToJsonFlags_Default = (DicomToJsonFlags_IncludeBinary | | |
485 DicomToJsonFlags_IncludePixelData | | |
486 DicomToJsonFlags_IncludePrivateTags | | |
487 DicomToJsonFlags_IncludeUnknownTags | | |
488 DicomToJsonFlags_ConvertBinaryToNull) | |
489 }; | |
490 | |
491 enum DicomFromJsonFlags | |
492 { | |
493 DicomFromJsonFlags_DecodeDataUriScheme = (1 << 0), | |
494 DicomFromJsonFlags_GenerateIdentifiers = (1 << 1) | |
495 }; | |
496 | |
497 enum DicomVersion | |
498 { | |
499 DicomVersion_2008, | |
500 DicomVersion_2017c | |
501 }; | |
502 | |
503 enum ModalityManufacturer | |
504 { | |
505 ModalityManufacturer_Generic, | |
506 ModalityManufacturer_GenericNoWildcardInDates, | |
507 ModalityManufacturer_GenericNoUniversalWildcard, | |
508 ModalityManufacturer_StoreScp, | |
509 ModalityManufacturer_ClearCanvas, | |
510 ModalityManufacturer_Dcm4Chee, | |
511 ModalityManufacturer_Vitrea | |
512 }; | |
513 | |
514 enum DicomRequestType | |
515 { | |
516 DicomRequestType_Echo, | |
517 DicomRequestType_Find, | |
518 DicomRequestType_Get, | |
519 DicomRequestType_Move, | |
520 DicomRequestType_Store | |
521 }; | |
522 | |
523 enum TransferSyntax | |
524 { | |
525 TransferSyntax_Deflated, | |
526 TransferSyntax_Jpeg, | |
527 TransferSyntax_Jpeg2000, | |
528 TransferSyntax_JpegLossless, | |
529 TransferSyntax_Jpip, | |
530 TransferSyntax_Mpeg2, | |
531 TransferSyntax_Rle | |
532 }; | |
533 | |
446 | 534 |
447 /** | 535 /** |
448 * WARNING: Do not change the explicit values in the enumerations | 536 * WARNING: Do not change the explicit values in the enumerations |
449 * below this point. This would result in incompatible databases | 537 * below this point. This would result in incompatible databases |
450 * between versions of Orthanc! | 538 * between versions of Orthanc! |
511 | 599 |
512 const char* EnumerationToString(RequestOrigin origin); | 600 const char* EnumerationToString(RequestOrigin origin); |
513 | 601 |
514 const char* EnumerationToString(PixelFormat format); | 602 const char* EnumerationToString(PixelFormat format); |
515 | 603 |
604 const char* EnumerationToString(ModalityManufacturer manufacturer); | |
605 | |
606 const char* EnumerationToString(DicomRequestType type); | |
607 | |
608 const char* EnumerationToString(TransferSyntax syntax); | |
609 | |
610 const char* EnumerationToString(DicomVersion version); | |
611 | |
516 Encoding StringToEncoding(const char* encoding); | 612 Encoding StringToEncoding(const char* encoding); |
517 | 613 |
518 ResourceType StringToResourceType(const char* type); | 614 ResourceType StringToResourceType(const char* type); |
519 | 615 |
520 ImageFormat StringToImageFormat(const char* format); | 616 ImageFormat StringToImageFormat(const char* format); |
523 | 619 |
524 ValueRepresentation StringToValueRepresentation(const std::string& vr, | 620 ValueRepresentation StringToValueRepresentation(const std::string& vr, |
525 bool throwIfUnsupported); | 621 bool throwIfUnsupported); |
526 | 622 |
527 PhotometricInterpretation StringToPhotometricInterpretation(const char* value); | 623 PhotometricInterpretation StringToPhotometricInterpretation(const char* value); |
624 | |
625 ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer); | |
626 | |
627 DicomVersion StringToDicomVersion(const std::string& version); | |
528 | 628 |
529 unsigned int GetBytesPerPixel(PixelFormat format); | 629 unsigned int GetBytesPerPixel(PixelFormat format); |
530 | 630 |
531 bool GetDicomEncoding(Encoding& encoding, | 631 bool GetDicomEncoding(Encoding& encoding, |
532 const char* specificCharacterSet); | 632 const char* specificCharacterSet); |
542 HttpStatus ConvertErrorCodeToHttpStatus(ErrorCode error); | 642 HttpStatus ConvertErrorCodeToHttpStatus(ErrorCode error); |
543 | 643 |
544 bool IsUserContentType(FileContentType type); | 644 bool IsUserContentType(FileContentType type); |
545 | 645 |
546 bool IsBinaryValueRepresentation(ValueRepresentation vr); | 646 bool IsBinaryValueRepresentation(ValueRepresentation vr); |
647 | |
648 Encoding GetDefaultDicomEncoding(); | |
649 | |
650 void SetDefaultDicomEncoding(Encoding encoding); | |
547 } | 651 } |