Skip to content

Fix bugs in read and write functions about strokeColor, fillColor, and position#23

Open
gaole2019 wants to merge 2 commits intodavidcsterratt:masterfrom
gaole2019:fix_bug
Open

Fix bugs in read and write functions about strokeColor, fillColor, and position#23
gaole2019 wants to merge 2 commits intodavidcsterratt:masterfrom
gaole2019:fix_bug

Conversation

@gaole2019
Copy link
Copy Markdown
Contributor

Hi, David,
Recently, I dealt with roi files in a stack image and found some bugs in the source code.

  1. strokeColor and fillColor are encoded as 32 bit unsigned integer (A, R, G, B) in ImageJ. However, in R, 32 bit integer can only be written in singned mode, which causes error in encoding and decoding the color. To overcome this problem, I chose to encode and decode strokeColor and fillColor using four bytes, parsing alpha, red, green, and blue channels, respectively.

  2. "position" is an important property when I dealt with a stack image, which indicates the index of slices of the roi. It is encoded as 32 bit unsigned integer with big-endian in ImageJ. But, now we used "little-endian", which gets the wrong value.

I also uploaded a demo_stack and roi file on slice 42 (https://drive.google.com/drive/folders/1ouCkL7eY-JnYYG49JAdCmoWEIJ7s1_qO?usp=drive_link). You can double check it.

Best regards

Le

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant