Skip to content

Commit

Permalink
Merge pull request #16 from okieraised/dev
Browse files Browse the repository at this point in the history
Hotfix RLE indexing
  • Loading branch information
okieraised authored Apr 3, 2023
2 parents 1e0bd26 + aadc0b5 commit fb2af3c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions annotation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ func TestSegmentation_Annotation4(t *testing.T) {
assert.NoError(err)

voxels := rd.GetNiiData().GetVoxels()
//voxels.FlipX()
//voxels.FlipY()
//voxels.FlipZ()
voxels.FlipX()
voxels.FlipY()
voxels.FlipZ()
err = rd.GetNiiData().SetVoxelToRawVolume(voxels)
assert.NoError(err)

Expand Down
2 changes: 1 addition & 1 deletion pkg/nifti/voxel.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ func (v *Voxels) ImportAsRLE() ([]SegmentRLE, error) {

for idx, voxVal := range sliceData {
if voxVal == key {
keyArr[idx] = key
keyArr[len(sliceData)-idx-1] = key
}
}
encoded, err := RLEEncode(keyArr)
Expand Down

0 comments on commit fb2af3c

Please sign in to comment.