Skip to content

Commit

Permalink
Merge branch 'tjrantal-timo-updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Domander committed Jun 8, 2018
2 parents 30709d5 + deda9a2 commit 298aa51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.scijava</groupId>
<artifactId>pom-scijava</artifactId>
<version>20.0.0</version>
<version>22.3.0</version>
<relativePath />
</parent>

Expand Down
10 changes: 8 additions & 2 deletions src/main/java/sc/fiji/pQCT/CTHeaderReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
import java.io.IOException;

import javax.activation.UnsupportedDataTypeException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;

class CTHeaderReader {

Expand All @@ -50,8 +52,12 @@ class CTHeaderReader {

private void readHeader(final DataInputStream input) throws IOException {
input.skipBytes(PERCENT_OFFSET);
percent = input.readDouble();
input.skipBytes(SITE_LENGTH_OFFSET - PERCENT_OFFSET);
byte[] temp = new byte[8];
input.read(temp);
ByteBuffer tempbb = ByteBuffer.wrap(temp);
tempbb = tempbb.order(ByteOrder.LITTLE_ENDIAN);
percent = tempbb.getDouble();
input.skipBytes(SITE_LENGTH_OFFSET - PERCENT_OFFSET-8);
final int siteLength = input.readByte();
final byte[] siteBytes = new byte[siteLength];
input.read(siteBytes, 0, siteLength);
Expand Down

0 comments on commit 298aa51

Please sign in to comment.