/godcm2img

Convert dicom to JPEG, PNG or BMP

Primary LanguageC++

godcm2img

go wrapper for dcmj2pnm (DCMTK)

Features

  • Simple API
  • Convert to JPEG, PNG and BMP

Dependencies

Quick start

How to install godcm2img?

  1. Install dcmtk to your system
  2. Get package
go get https://github.com/azubkokshe/godcm2img

How to convert dicom?

dcmConverter := dcm2img.New()
defer dcmConverter.Free()

resp, err = dcmConverter.GetJPEG(&fileData, dcm2img.ConvertProperties{
    FrameNumber: req.FrameNumber,
    Quality:     req.Quality,
    UseClip:     isUseClip,
    ClipLeft:    req.RegionLeft,
    ClipTop:     req.RegionTop,
    ClipWidth:   req.RegionWidth,
    ClipHeight:  req.RegionHeight,
    UseScale:    isUseScale,
    ScaleWidth:  req.Columns,
    ScaleHeight: req.Rows,
})