Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDictionaryTag ¶
GetDictionaryTag - get tag from Dictionary
func GetDictionaryVR ¶
GetDictionaryVR - get info from Dictionary
Types ¶
type BufData ¶
type BufData interface {
ClearMemoryStream()
IsBigEndian() bool
SetBigEndian(isBigEndian bool)
GetPosition() int
SetPosition(position int)
GetSize() int
Read(count int) ([]byte, error)
ReadByte() (byte, error)
ReadUint16() (uint16, error)
ReadUint32() (uint32, error)
Write(data []byte, count int) (int, error)
WriteByte(value byte) error
WriteUint16(value uint16)
WriteUint32(value uint32)
WriteString(value string)
ReadTag(explicitVR bool) (*DcmTag, error)
WriteTag(tag *DcmTag, explicitVR bool)
WriteStringTag(group uint16, element uint16, vr string, content string, explicitVR bool)
ReadMeta() (*transfersyntax.TransferSyntax, error)
WriteMeta(SOPClassUID string, SOPInstanceUID string, TransferSyntax string)
ReadObj(obj DcmObj) bool
WriteObj(obj DcmObj)
Send(rw *bufio.ReadWriter) error
GetAllBytes() []byte
}
BufData - is an interface to buffer manipulation class
func NewBufDataFromFile ¶
NewBufDataFromFile -
type DCMStudy ¶
type DCMStudy struct {
PatientID string
PatientName string
PatientBD string
PatientSex string
ReferringPhysician string
StudyDate string
StudyTime string
ReportDate string
ReportTime string
AccessionNumber string
Modality string
InstitutionName string
Description string
StudyInstanceUID string
ReportText string
ObserverName string
}
DCMStudy study information structure
type DcmObj ¶
type DcmObj interface {
Add(tag *DcmTag)
AddConceptNameSeq(group uint16, element uint16, CodeValue string, CodeMeaning string)
AddSRText(text string)
DumpTags()
IsExplicitVR() bool
SetExplicitVR(explicit bool)
IsBigEndian() bool
SetBigEndian(bigEndian bool)
GetDate(tag *tags.Tag) time.Time
GetPixelData(frame int) ([]byte, error)
GetTagAt(i int) *DcmTag
GetTag(tag *tags.Tag) *DcmTag
GetTagGE(group uint16, element uint16) *DcmTag
SetTag(i int, tag *DcmTag)
InsertTag(i int, tag *DcmTag)
DelTag(i int)
GetTags() []*DcmTag
GetUShort(tag *tags.Tag) uint16
GetUInt(tag *tags.Tag) uint32
GetString(tag *tags.Tag) string
GetUShortGE(group uint16, element uint16) uint16
GetUIntGE(group uint16, element uint16) uint32
GetStringGE(group uint16, element uint16) string
WriteDate(tag *tags.Tag, date time.Time)
WriteDateRange(tag *tags.Tag, startDate time.Time, endDate time.Time)
WriteTime(tag *tags.Tag, date time.Time)
WriteUint16(tag *tags.Tag, val uint16)
WriteUint32(tag *tags.Tag, val uint32)
WriteString(tag *tags.Tag, content string)
WriteUint16GE(group uint16, element uint16, vr string, val uint16)
WriteUint32GE(group uint16, element uint16, vr string, val uint32)
WriteStringGE(group uint16, element uint16, vr string, content string)
GetTransferSyntax() *transfersyntax.TransferSyntax
SetTransferSyntax(ts *transfersyntax.TransferSyntax)
ChangeTransferSynx(ts *transfersyntax.TransferSyntax) error
TagCount() int
CreateSR(study DCMStudy, SeriesInstanceUID string, SOPInstanceUID string)
CreatePDF(study DCMStudy, SeriesInstanceUID string, SOPInstanceUID string, fileName string)
WriteToBytes() []byte
WriteToFile(fileName string) error
// contains filtered or unexported methods
}
DcmObj - DICOM Object structure
func NewDCMObjFromBytes ¶
NewDCMObjFromBytes - Read from a DICOM bytes into a DICOM Object
func NewDCMObjFromFile ¶
NewDCMObjFromFile - Read from a DICOM file into a DICOM Object
func NewEmptyDCMObj ¶
func NewEmptyDCMObj() DcmObj
NewEmptyDCMObj - Create as an interface to a new empty dcmObj
type DcmTag ¶
type DcmTag struct {
Name string
Description string
Group uint16
Element uint16
Length uint32
VR string
VM string
Data []byte
BigEndian bool
}
DcmTag DICOM tag structure
type JSONAlphabeticValue ¶
type JSONAlphabeticValue struct {
Family []string `json:"Family,omitempty"`
Given []string `json:"Given,omitempty"`
Suffix []string `json:"Suffix,omitempty"`
}
JSONAlphabeticValue - JSON struct for alphabetic value
type JSONObj ¶
type JSONObj interface {
}
JSONObj - JSON struct for DICOM data
func NewJSONObj ¶
func NewJSONObj() JSONObj
NewJSONObj - Creates a new jsonObj and returns an interface to it
func NewJSONObjFromDcmObj ¶
NewJSONObjFromDcmObj - Creates a new jsonObj and parses DcmObj into it
type JSONPNValue ¶
type JSONPNValue struct {
Alphabetic JSONAlphabeticValue `json:"Alphabetic"`
Ideographic JSONAlphabeticValue `json:"Ideographic,omitempty"`
}
JSONPNValue - JSON struct for PN value
type JSONTag ¶
type JSONTag struct {
VR string `json:"vr"`
Value []interface{} `json:"Value"`
}
JSONTag - JSON struct for a DICOM tag
type MemoryStream ¶
type MemoryStream interface {
GetData() []byte
Get() (int, error)
GetByte() (byte, error)
GetUint16() (uint16, error)
GetUint32() (uint32, error)
GetInt() (int, error)
GetPosition() int
SetPosition(position int)
GetSize() int
SetSize(size int)
Append(data []byte) (int, error)
ReadData(input []byte) error
Read(count int) ([]byte, error)
ReadFully(rw *bufio.ReadWriter, length int)
Write(buffer []byte, count int) (int, error)
Clear()
}
MemoryStream - is an inteface to a memory stream
func NewEmptyMemoryStream ¶
func NewEmptyMemoryStream() MemoryStream
NewEmptyMemoryStream - Creates an inteface to a new empty memoryStream
func NewMemoryStreamFromBytes ¶
func NewMemoryStreamFromBytes(data []byte) MemoryStream
NewMemoryStreamFromBytes - Creates an interface to a new memoryStream from bytes
func NewMemoryStreamFromFile ¶
func NewMemoryStreamFromFile(fileName string) (MemoryStream, error)
NewMemoryStreamFromFile - Creates an interface to a new memoryStream from file