Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ImageJ/Holo/About_.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class About_ implements PlugIn
{
private String version = "1.0.6";
private String version = "1.0.7";
private String holo_file_specification_link = "https://ftp.espci.fr/incoming/Atlan/holovibes/holo/HoloFileSpecification.pdf";
private String github_repository = "https://github.com/DigitalHolography/ImportExportScriptsForHoloFiles";

Expand Down
Binary file modified ImageJ/Holo/Open_Holo.class
Binary file not shown.
6 changes: 3 additions & 3 deletions ImageJ/Holo/Open_Holo.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private int check_data_integrity()
{
if (magic_number != 1330401096) // 1330401096 == "HOLO"
return 1;
if (version != 2 && version != 1 && version != 0) // TODO: Manage other version of holo files
if (version != 4 && version != 2 && version != 1 && version != 0) // TODO: Manage other version of holo files
return 2;
if (bit_depth != 8 && bit_depth != 16 && bit_depth != 24)
return 3;
Expand Down Expand Up @@ -130,7 +130,7 @@ private void parse_header(InputStream is) throws IOException
version = (int)(u_hdr[4] | (u_hdr[5] << 8));

// Reading last bytes from header
if (version == 2 || version == 1)
if (version == 4 || version == 2 || version == 1)
{
read_bytes = is.read(buf, 6, 58); // 58 + 6 = 64 total header bytes
if (read_bytes != 58)
Expand All @@ -157,7 +157,7 @@ else if (version == 0)
data_size = (long)width * height * num_frames * (bit_depth / 8);
endianness = 0;

if (version == 2 || version == 1)
if (version == 4 || version == 2 || version == 1)
{
data_size = (long)(u_hdr[20] | (u_hdr[21] << 8) | (u_hdr[22] << 16) | (u_hdr[23] << 24)
| (u_hdr[24] << 32) | (u_hdr[25] << 40) | (u_hdr[26] << 48) | (u_hdr[27] << 56));
Expand Down
Binary file modified ImageJ/Holo/Save_Holo.class
Binary file not shown.
2 changes: 1 addition & 1 deletion ImageJ/Holo/Save_Holo.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void writeImage(ImagePlus imp) throws IOException

// Get header informations from current images stacks
magic_number = "HOLO";
version = 2;
version = 4;
bit_depth = imp.getBitDepth();
width = imp.getWidth();
height = imp.getHeight();
Expand Down
2 changes: 1 addition & 1 deletion Matlab/Write_Holo.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Write_Holo(input_array, filepath)

%%Write the header
fwrite(fd, 'HOLO'); % Magic number, always set to "HOLO"
fwrite(fd, 2, 'uint16'); % Version of holo file
fwrite(fd, 4, 'uint16'); % Version of holo file
fwrite(fd, bit_depth, 'uint16'); % Bit depth of data
fwrite(fd, frame_width, 'uint32'); % Width of a frame
fwrite(fd, frame_height, 'uint32'); % Height of a frame
Expand Down
2 changes: 1 addition & 1 deletion Python/holo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from struct import pack, unpack
import numpy as np

holo_header_version = 2
holo_header_version = 4
holo_header_size = 64
holo_header_padding_size = 35

Expand Down