func (v VENC) PixelIntensityToVelocity(pixelIntensity float64) (velocity float64) {

	// Note: I think it should be (2^BS - 1) because, e.g., that's the dynamic
	// range in a 0-based system that has a min value of 0 and a max value of
	// 4095 with a BS of 12.
	slope := 2 * v.FlowVenc / (math.Pow(2, v.BitsStored) - 1)

	intercept := -v.FlowVenc

	return pixelIntensity*slope + intercept
}
// PixelIntensityToVelocity converts a pixel intensity (from DICOM format) into
// a value that ranges from -flowvenc to +flowvenc.
PixelIntensityToVelocity converts a pixel intensity (from DICOM format) into
a value that ranges from -flowvenc to +flowvenc.
// PixelIntensityToVelocity converts a pixel intensity ( from DICOM format ) into // a value that ranges from - flowvenc to + flowvenc .
func (v VENC) PixelIntensityToVelocity(pixelIntensity float64) (velocity float64) {
	slope := 2 * v.FlowVenc / (math.Pow(2, v.BitsStored) - 1)
	intercept := -v.FlowVenc
	return pixelIntensity*slope + intercept
}
func ( v VENC ) PixelIntensityToVelocity ( pixelIntensity float64 ) ( velocity float64 ) { slope := 2 * v . FlowVenc / ( math . Pow ( 2 , v . BitsStored ) - 1 ) intercept := - v . FlowVenc return pixelIntensity * slope + intercept }
PixelIntensityToVelocity converts a pixel intensity (from DICOM format) into
a value that ranges from -flowvenc to +flowvenc.
PixelIntensityToVelocity converts a pixel intensity ( from DICOM format ) into a value that ranges from - flowvenc to + flowvenc .
// Note: I think it should be (2^BS - 1) because, e.g., that's the dynamic // range in a 0-based system that has a min value of 0 and a max value of // 4095 with a BS of 12.