func ExtractDicomFromGoogleStorage(zipPath, dicomName string, includeOverlay bool, storageClient *storage.Client) (image.Image, error) {
	// Read the zip file handle into memory still compressed and turn it into an
	// io.ReaderAt which is appropriate for consumption by the zip reader -
	// either from a local file, or from Google storage, depending on the prefix
	// you provide.
	f, nbytes, err := MaybeOpenFromGoogleStorage(zipPath, storageClient)
	if err != nil {
		return nil, err
	}

	rc, err := zip.NewReader(f, nbytes)
	if err != nil {
		return nil, err
	}

	// Now we have our compressed zip data in an zip.Reader, regardless of its
	// origin.
	return ExtractDicomFromZipReader(rc, dicomName, includeOverlay)
}
// ExtractDicomFromGoogleStorage fetches a dicom from within a zipped file in
// Google Storage and returns it as a native go image.Image, optionally with the
// overlay displayed on top.
ExtractDicomFromGoogleStorage fetches a dicom from within a zipped file in
Google Storage and returns it as a native go image.Image, optionally with the
overlay displayed on top.
// ExtractDicomFromGoogleStorage fetches a dicom from within a zipped file in // Google Storage and returns it as a native go image . Image optionally with the // overlay displayed on top .
func ExtractDicomFromGoogleStorage(zipPath, dicomName string, includeOverlay bool, storageClient *storage.Client) (image.Image, error) {
	f, nbytes, err := MaybeOpenFromGoogleStorage(zipPath, storageClient)
	if err != nil {
		return nil, err
	}
	rc, err := zip.NewReader(f, nbytes)
	if err != nil {
		return nil, err
	}
	return ExtractDicomFromZipReader(rc, dicomName, includeOverlay)
}
func ExtractDicomFromGoogleStorage ( zipPath , dicomName string , includeOverlay bool , storageClient * storage . Client ) ( image . Image , error ) { f , nbytes , err := MaybeOpenFromGoogleStorage ( zipPath , storageClient ) if err != nil { return nil , err } rc , err := zip . NewReader ( f , nbytes ) if err != nil { return nil , err } return ExtractDicomFromZipReader ( rc , dicomName , includeOverlay ) }
ExtractDicomFromGoogleStorage fetches a dicom from within a zipped file in
Google Storage and returns it as a native go image.Image, optionally with the
overlay displayed on top.
ExtractDicomFromGoogleStorage fetches a dicom from within a zipped file in Google Storage and returns it as a native go image . Image optionally with the overlay displayed on top .
// Read the zip file handle into memory still compressed and turn it into an // io.ReaderAt which is appropriate for consumption by the zip reader - // either from a local file, or from Google storage, depending on the prefix // you provide. // Now we have our compressed zip data in an zip.Reader, regardless of its // origin.