Skip to content

Commit

Permalink
Fix ci build error
Browse files Browse the repository at this point in the history
  • Loading branch information
segmed-lam committed Jul 30, 2024
1 parent 18e6b53 commit ef04346
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/bench_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
go-version: 1.22
id: go

- name: Check out code
- name: Check out code
uses: actions/checkout@v1

- name: Get dependencies
run: |
run: |
sudo apt-get update
sudo apt-get install -y pkg-config swig libcharls-dev libdcmtk-dev libopenjp2-7-dev
go mod download
- name: Benchmark against GITHUB_BASE_REF
run: |
go install golang.org/x/perf/cmd/benchstat@latest
Expand All @@ -32,4 +34,4 @@ jobs:
git log -1 --format="%H"
go test -bench=. -benchmem -benchtime=10x -count=7 > $HOME/old.txt
$GOBIN/benchstat $HOME/old.txt $HOME/new.txt
8 changes: 5 additions & 3 deletions .github/workflows/bench_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ jobs:
go-version: 1.22
id: go

- name: Check out code
- name: Check out code
uses: actions/checkout@v1

- name: Get dependencies
run: |
run: |
sudo apt-get update
sudo apt-get install -y pkg-config swig libcharls-dev libdcmtk-dev libopenjp2-7-dev
go mod download
- name: Benchmark (against HEAD~1)
run: |
go install golang.org/x/perf/cmd/benchstat@latest
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ jobs:
go-version: 1.22
id: go

- name: Check out code
- name: Check out code
uses: actions/checkout@v1

- name: Get dependencies
run: |
sudo apt-get update
sudo apt-get install -y pkg-config swig libcharls-dev libdcmtk-dev libopenjp2-7-dev
go mod download
- name: Build
run: |
make build-fast
- name: Test
run: |
make test
8 changes: 4 additions & 4 deletions pkg/codec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
)

func main() {
dataset, err := dicom.ParseFile("testdata/1.dcm", nil)
pixelDataElem, err := dataset.FindElementByTag(tag.PixelData)
pixelData := dicom.MustGetPixelDataInfo(pixelDataElem.Value)
encapsulatedFrame, err := pixelData.Frames[0].GetEncapsulatedFrame()
dataset, err := dicom.ParseFile("testdata/1.dcm", nil)
pixelDataElem, err := dataset.FindElementByTag(tag.PixelData)
pixelData := dicom.MustGetPixelDataInfo(pixelDataElem.Value)
encapsulatedFrame, err := pixelData.Frames[0].GetEncapsulatedFrame()
image, err = encapsulatedFrame.GetImage()
...
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/codec/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
// Copyright (c) 2023 Segmed Inc.
package codec

// #cgo pkg-config: libopenjp2 dcmtk charls
// #cgo pkg-config: libopenjp2 charls
// #cgo darwin pkg-config: dcmtk
// #cgo linux LDFLAGS: -ldcmjpeg
import "C"
2 changes: 1 addition & 1 deletion pkg/codec/testdata/data_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ be mentioned in one of them for brevity.
dcmdump --write-pixel ../pkg/codec/testdata/ 3_jpeg.dcm
```

#### Files a1_mono.jls and a1_mono.ppm
#### Files a1_mono.j2c and a1_mono.ppm
These files were sourced from [openjpeg-data](https://github.com/uclouvain/openjpeg-data)

0 comments on commit ef04346

Please sign in to comment.