Skip to content

Commit

Permalink
DICOMFormat: add suport for pixel sign
Browse files Browse the repository at this point in the history
Add case logic to support the scenario that "Pixel Intensity
Relationship Sign" is being used to mark the sign of the byte type.

Closes #260
  • Loading branch information
hinerm committed Feb 24, 2015
1 parent 76ec003 commit 7dcea1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/io/scif/formats/DICOMFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ public static class Parser extends AbstractParser<Metadata> {
// -- Constants --

private static final int PIXEL_REPRESENTATION = 0x00280103;
private static final int PIXEL_SIGN = 0x00281041;
private static final int TRANSFER_SYNTAX_UID = 0x00020010;
private static final int SLICE_SPACING = 0x00180088;
private static final int SAMPLES_PER_PIXEL = 0x00280002;
Expand Down Expand Up @@ -1267,6 +1268,7 @@ else if (s.contains("1.2.4") || s.contains("1.2.5")) {
addInfo(meta, tag, bitsPerPixel);
break;
case PIXEL_REPRESENTATION:
case PIXEL_SIGN:
final short ss = getSource().readShort();
signed = ss == 1;
addInfo(meta, tag, ss);
Expand Down

0 comments on commit 7dcea1c

Please sign in to comment.