go wrapper for dcmj2pnm (DCMTK)
- Simple API
- Convert to JPEG, PNG and BMP
- Install dcmtk to your system
- Get package
go get https://github.com/azubkokshe/godcm2img
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,
})