DSK(SDK)

Deepsound Software Development Kit (DSK) API Reference Manual.

API Reference Manual

Copyrightⓒ 2020 / SEONGSAN INC

This manual is protected under national and international copyright laws.

No part of this manual may be reproduced, distributed, translated, or transmitted in any form or by any means electronic or mechanical, including but not limited to photocopying, recording, or storing in any information storage and retrieval system without prior written permission of SEONGSAN LAB INC.

All rights reserved

If this document is distributed with software containing the end-user agreement, this manual and the software described herein are licensed and may only be used or copied in accordance with the terms of the license. Unless permitted by such license, no part of this guide may be reproduced, stored or transmitted in any form or means (e.g., electronics, machinery, recording, etc.) without prior written approval from SEONGSAN LAB INC. The contents of this manual are protected by copyright law even if it is not distributed with software containing an end-user license agreement.

The contents of this guide are provided for informational purposes only, subject to change without prior notice, and shall not be used as any part of the agreement or contract of SEONGSAN LAB INC, which shall not be liable for any errors or inaccuracies in the information contained in this guide. Existing illustrations or images that you wish to include in your project may be protected by copyright law. You must obtain permission from the copyright owner.

References to company names, company logos, and user names in sample materials or sample forms included in this manual and/or software are solely for its purpose and do not refer to any actual organization or person. DEEPSOUND is a registered trademark of Seongsan Research Institute in Korea and is the property of its owner.

Contact Information:
SEONGSAN INC

P : 02-2039-5725
F: 02-2039-5726
www.seongsanlab.com
admin@seongsanlab.com
Quality Control:
All processes are to follow the quality standards of SEONGSAN LAB INC

Disclaimer

SEONGSAN LAB INC, 2020. Ver 1.0. *All information in this document is subject to change without prior notice.

DSK Change Log:

VersionChange Log
1.0First release
1.3Added Multi Channel function
1.4Added Multi Board function and enhanced Focal Law Angle Resolution

Table of Contents

INTRODUCTION

This Document explains the API of DSK. All the API of DSK are in the format of DSK.XXX where XXX represents functions. These functions are largely divided into categories such as Init, Get, Set, Upload, etc.

Use the Get functions to get DSK’s parameters, and the Set function to set those parameters. In order to use the Set function to actually set parameters, the UploadAllParameters function must be called.

Calling the UploadAllParameters function to set the DSK parameters is a time consuming process. To expedite this process, use the UploadXXX function for individual parameters.

For example, you can set the Gain value with either one of the following two methods. If Gain is the only value that changed, the two methods perform the same action, but the second method is faster.

1SetGain(value)
UploadAllParameters()
2UploadGain(value)

Only the frequently used parameters have a dedicated Upload function.

Unless specified otherwise, DSK uses mm for lengths, degrees for angles, Hz for frequencies, and seconds as the unit of time.

Init Functions

There are two types of Init functions: InitDsk and InitDevice. InitDsk is the first function that must be called in order to use DSK, and InitDevice is used to initialize the hardware to generate an image.

CloseDevice is called to close the program.

NameInput ValueDescription
CloseDeviceNoneMust be called to close the program
InitDeviceNoneInitializes the hardware
InitDskNoneThe first function that must be called to use DSK

Get Functions

NameReturn ValueDescription
GetApertureSizeintReturns the aperture size in Linear Array Mode
GetApertureStepintReturns the number of steps taken by aperture per vector in LinearArray Mode
GetAcquisitionRatedoubleReturns the framerate (acquisition rate per second) depending on the image settings
GetDepthStartdoubleReturns the starting point of Depth
GetDepthRangedoubleReturns the range of Depth
GetDigitizingIndexintReturns the indices of the sampling frequency(0: 50MHz, 1: 25MHz, 2:12.5MHz)
GetFilterStartFreqdoubleReturns the starting frequency of Filter
GetFilterStopFreqdoubleReturn the stopping frequency of Filter
GetFirstElementHeightdoubleReturns the height of the first element of the probe’s wedge.
GetFocusLocationdoubleReturns the focus depth being sent
GetGaindoubleReturns gain (in dB)
GetIsProbeUtConnectorboolDetermines whether the probe’s connector is a UT connector (e.g. BNC) or not
GetIsWedgeEnableboolRepresents whether or not a wedge is being used
GetMainSampleFrequencydoubleReturns the system’s main sampling frequency in Hz (e.g. 50e6)
GetPrfintReturns PRF (Pulse Repetition Frequency) value
GetProbeElementCountintReturns the number of probe elements
GetProbeFirstElementintReturns the starting point of the element if the probe is split into multiple channel groups
GetProbeFrequencydoubleReturns the probe frequency in Hz
GetProbePitchdoubleReturns the pitch between probe elements in mm
GetProbeTypeDskProbeTypeReturns probe type
GetPulseBurstCountintReturns the number of transmitted ultrasonic pulses
GetPulseVoltageintReturns the voltage of the transmitted ultrasonic pulse
GetPulseWidthdoubleReturns the width of the transmitted ultrasonic pulse
GetRefractedAngleResolutiondoubleReturns the resolution of the view angle in Sectorial Mode. The typical value used is 1.
GetRefractedAngleStartdoubleReturns the starting point of the view angle in Sectorial Mode
GetRefractedAngleStopdoubleReturns the ending point of the view angle in Sectorial Mode
GetRxElementStartintReturns the starting point of the receive element from the probe
GetRxElementStopintReturns the stopping point of the receive element from the probe
GetSampleCountPerVectorintReturns the number of samples per vector
GetSScanHeightintReturns height of S scan image
GetSScanWidthintReturns width of S scan image
GetTxElementStartintReturns starting point of transmit element from the probe
GetTxElementStopintReturns stopping point of transmit element from the probe
GetVectorCountintReturns the number of vectors per frame where each frame is comprised of multiple vectors
GetVelocityInSpecimenintReturns the velocity of the ultrasonic wave in the specimen
GetVersionstringReturns the version number as a string (e.g. “1.0”)
GetWedgeAngledoubleReturns the wedge angle
GetWedgeDelaydoubleReturns the wedge delay that has been set
GetWedgeVelocitydoubleReturns the velocity of the longitudinal ultrasonic wave from the wedge

Get scan image parameters

Unlike A scan, B scan, and C scan, S Scan Mode changes the image width through scan conversion depending on the image parameters. In other words, if you change the image parameters, use the methods listed above to obtain the width and height, and display the image on the screen after color mapping.

GetSScanWidth

GetSScanHeight

This is to make sure the entire area of the width and height calculated by S Scan Image goes through scan conversion. Additionally, the byte array returned by CalcSScanImage is equal to the product of SScanWidth and SScanHeight.

Set Functions

NameInput ValueDescription
SetApertureSizeStepint size,int stepSets the aperture size in Linear Mode
SetBeamTypeDskBeamType typeSets the Beam type (Linear or Azimuth)
SetDepthdouble start, double rangeSets the depth data
SetDigitizingIndexdouble indexSets the sample frequency
SetEncoderAxisReversebool reverseSwitches scan encoder and index encoder with each other
SetFilterBandwidthdouble start, double stopSets the filter’s start and stop frequencies
SetFocusLocationdouble focusSets TX Focus location
SetGaindouble gainSets gain value
SetIndexEncoderdouble start, double stop, double step, double resolution, bool reverseSets index encoder. All units are in mm
SetPrfint prfSets PRF value
SetProbeFirstElementint firstElementSets the first element of the probe
SetProbeRxElementLocationint start, int stopSets the RX element location
SetProbeSpecificationdouble freq, double pitch, int elementCountSets the probe specifications
SetProbeTxElementLocationint start, int stopSets TX element location
SetProbeTypeDskProbeType typeSets the probe type
SetProbeUTConnectorbool isUtPortIndicates that it is a UT port
SetPulseBurstCountint burstCountSets the number of TX bursts
SetPulseVoltageint voltageSets the TX voltage
SetPulseWidthdouble pulseWidthSets the TX pulse width
SetScanEncoderdouble start, double stop, double step, double resolution, bool reverseSets the Scan encoder values. All units are mm
SetRefractedAngleGeometrydouble start, double stop, double resolutionShows the view angle geometry in Sectorial Mode
SetVelocityInSpecimenint velocitySets the velocity in the specimen
SetWedgeDelaydouble wedgeDelaySets the Wedge Delay
SetWedgeSpecificationbool wedgeEnable, double wedgeAngle, int velocityInWedge, double firstElementHeightSets the wedge specifications

Set Callback functions

DECLARATION

void DSK.SetCallBackFrame(DskCallBackFrame func)

void DSK.SetCallBackFrame(DskCallBackFrameX func)

void DSK.SetCallBackFrame(DskCallBackFrameXY func)

void DSK.SetCallBackFrame(DskCallBackFrameXYZ func)

void DSK.SetCallBackFrame(DskCallBackFrameMultiBoardXYZ func)

DESCRIPTION

Sets the Callback method. You must pass in one of the delegate methods listed below in the NOTES section to the input. Depending on the type of encoder location you need, only call the method once.

PARAMETERS

Delegate methods are categorized depending on the encoder coordinates it is trying to receive.

RETURN VALUE

None

NOTE

public delegate void DskCallBackFrame(short[] frameData);

public delegate void DskCallBackFrameX(short[] frameData, double locX);

public delegate void DskCallBackFrameXY(short[] frameData, double locX, double locY); public delegate void DskCallBackFrameXYZ(short[] frameData, double locX, double locY, double locZ);

public delegate void DskCallBackFrameMultiBoardXYZ(int boardId, short[] frameData, double locX, double locY, double locZ);

All location information is in mm.

Upload Functions

NameInput ValueDescription
UploadAllParametersNoneCalculates and changes the hardware settings depending on the DSK settings. This method must always be called after calling the DSK Set method.
UploadDepthStartRangedouble start, double rangeSets the starting depth and range
UploadGaindouble gainSets the gain value
UploadInspectionModeStartNoneStarts Inspection Mode
UploadInspectionModeStopNoneEnds Inspection Mode
UploadPrfint prfSets PRF value

Additional Functions

NameInput / ReturnDescription
CalcSScanImageInput : short[] framedata
Return : byte[]
Runs scan conversion
FreezeNoneFreezes image acquisition
UnfreezeNoneUnfreezes image acquisition

Calc S Scan Image

In order to display the S Scan Image, it must go through scan conversion. Calling this method using the frame data obtained from the Callback method will return the data that has been scan converted. Pass in the short array into the input to return the scan converted byte array. Since the returned value is a byte value, it must go through color mapping and be converted into a color image before displaying onto the screen.

DSPAUT

Technical Support Portal

© 2026 SEONGSANLAB Co., Ltd. All rights reserved.