BSOne.SFC/EM.Lib/ImageEn_SRC/Source/Delphi10.1Berlin/iedicom.hpp

158 lines
6.3 KiB
C++

// CodeGear C++Builder
// Copyright (c) 1995, 2025 by Embarcadero Technologies, Inc.
// All rights reserved
// (DO NOT EDIT: machine generated header) 'iedicom.pas' rev: 37.00 (Windows)
#ifndef iedicomHPP
#define iedicomHPP
#pragma delphiheader begin
#pragma option push
#if defined(__BORLANDC__) && !defined(__clang__)
#pragma option -w- // All warnings off
#pragma option -Vx // Zero-length empty class member
#endif
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <Winapi.Windows.hpp>
#include <Winapi.Messages.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>
#include <Vcl.Graphics.hpp>
#include <iexBitmaps.hpp>
#include <jpegfilt.hpp>
#include <imageenio.hpp>
#include <hyiedefs.hpp>
#include <imageenproc.hpp>
#include <iej2000.hpp>
//-- user supplied -----------------------------------------------------------
namespace Iedicom
{
//-- forward type declarations -----------------------------------------------
struct TIEDicomTagInfo;
class DELPHICLASS TDicomReadContext;
//-- type declarations -------------------------------------------------------
struct DECLSPEC_DRECORD TIEDicomTagInfo
{
public:
System::Word Group;
System::Word Element;
System::SmallString<80> Desc;
Iexbitmaps::TIEDicomTagType VType;
Iexbitmaps::TIEDicomTagSource Src;
};
typedef TIEDicomTagInfo *PIEDicomTagInfo;
class PASCALIMPLEMENTATION TDicomReadContext : public System::TObject
{
typedef System::TObject inherited;
private:
Iexbitmaps::TIOParams* IOParams;
Iexbitmaps::TIEBitmap* Bitmap;
Hyiedefs::TProgressRec Progress;
Iexbitmaps::TIEBufferedReadStream* Stream;
__int64 StreamSize;
bool Implicit;
bool LittleEndian;
System::AnsiString TransferSyntax;
__int64 ThumbPos;
__int64 ImagePos;
int SamplesPerPixel;
System::AnsiString PhotometricInterpretation;
int PlanarConfiguration;
int FrameCount;
int PixelRepresentation;
int Width;
int Height;
int BitsAllocated;
int BitsStored;
int BytesPerChannel;
System::Sysutils::PWordArray RMap;
System::Sysutils::PWordArray GMap;
System::Sysutils::PWordArray BMap;
void *GrayMap;
double WindowCenter;
double WindowWidth;
double RescaleIntercept;
double RescaleSlope;
int SmallestImagePixelValue;
int LargestImagePixelValue;
System::Byte __fastcall ReadByte();
System::Word __fastcall ReadWord(bool rev);
unsigned __fastcall ReadDWord(bool rev);
void __fastcall ReRangeJpeg2KPixels16();
void __fastcall AdjustRange16g_adjust();
void __fastcall AdjustRange16g_set();
void __fastcall AdjustRange16g();
void __fastcall AdjustRange8g_adjust();
void __fastcall AdjustRange8g_set();
void __fastcall AdjustRange8g();
void __fastcall AdjustMonochrome16g(int maxval);
void __fastcall AdjustMonochrome8g_adjust();
void __fastcall AdjustMonochrome8g_set();
void __fastcall AdjustMonochrome8g();
void __fastcall VerticalFlip();
bool __fastcall ReadTag(Iexbitmaps::TIEDicomTags* tags);
Iexbitmaps::TIEDicomTagType __fastcall GuessVR();
int __fastcall GetValueW(System::Word w);
int __fastcall GetValueB(System::Byte b);
void __fastcall EstimateWindow16g();
void __fastcall EstimateWindow8g();
public:
__fastcall TDicomReadContext(System::Classes::TStream* Stream_, Hyiedefs::TProgressRec &Progress_);
__fastcall virtual ~TDicomReadContext();
void __fastcall ReadHeader();
void __fastcall ReadTags(Iexbitmaps::TIOParams* Params);
void __fastcall GetImage(Iexbitmaps::TIEBitmap* DstBitmap, Iexbitmaps::TIOParams* Params, bool Preview);
};
//-- var, const, procedure ---------------------------------------------------
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_UNCOMP_LITTLEENDIAN_IMPLICIT;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_UNCOMP_LITTLEENDIAN_EXPLICIT;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_UNCOMP_BIGENDIAN_EXPLICIT;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_RLE;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSLESSJPEG1;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSLESSJPEG2;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSYJPEG8BIT;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSYJPEG12BIT;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSLESSJPEG2000;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_LOSSYJPEG2000;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_MPEG;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_MPEG101;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_MPEG102;
extern DELPHI_PACKAGE System::AnsiString IEDICOM_TRANSFERSYNTAX_MPEG103;
#define IEDICOM_PHOTOMETINTERPRET_MONOCHROME_ZEROISWHITE L"MONOCHROME1"
#define IEDICOM_PHOTOMETINTERPRET_MONOCHROME_ZEROISBLACK L"MONOCHROME2"
#define IEDICOM_PHOTOMETINTERPRET_PALETTECOLOR L"PALETTE COLOR"
#define IEDICOM_PHOTOMETINTERPRET_YBRFULL L"YBR_FULL"
#define IEDICOM_PHOTOMETINTERPRET_RGB L"RGB"
static _DELPHI_CONST System::Word Dicom_Tag_Count = System::Word(0x1313);
extern DELPHI_PACKAGE PIEDicomTagInfo __fastcall IEDicomGetTagInfo(System::Word Group, System::Word Element)/* overload */;
extern DELPHI_PACKAGE TIEDicomTagInfo __fastcall IEDicomGetTagInfo(int Idx)/* overload */;
extern DELPHI_PACKAGE void __fastcall IEDicomRead(System::Classes::TStream* Stream, Iexbitmaps::TIOParams* Params, Iexbitmaps::TIEBitmap* DstBitmap, Hyiedefs::TProgressRec &Progress, bool Preview);
extern DELPHI_PACKAGE bool __fastcall IEDicomTryStream(System::Classes::TStream* Stream);
extern DELPHI_PACKAGE int __fastcall IEDicomImageCount(System::Classes::TStream* Stream)/* overload */;
extern DELPHI_PACKAGE int __fastcall IEDicomImageCount(System::UnicodeString FileName)/* overload */;
extern DELPHI_PACKAGE void * __fastcall IEDicomWrite_init(System::Classes::TStream* Stream, Iexbitmaps::TIOParams* Params, int ImagesCount, Hyiedefs::TProgressRec &Progress);
extern DELPHI_PACKAGE void __fastcall IEDicomWrite_addImage(void * Context, Iexbitmaps::TIEBitmap* Image);
extern DELPHI_PACKAGE void __fastcall IEDicomWrite_finalize(void * Context);
} /* namespace Iedicom */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_IEDICOM)
using namespace Iedicom;
#endif
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // iedicomHPP