Skip to content

Commit

Permalink
bugfix: generated python couldn't deal with time lapse data
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Nov 15, 2020
1 parent c756d71 commit c2bc3d2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ public String push(ImagePlus source) {
String program = "\n";
String filename = getFilename(source);

String timepoint = "";
if (source.getNFrames() > 1) {
timepoint = "[" + (source.getFrame() - 1) + "]";
}

program = program +
"# Load image\n" +
"image = imread(\"" + filename.replace("\\", "/") + "\")\n\n" +

"# Push " + source.getTitle() + " to GPU memory\n" +
makeImageID(source) + " = cle.push_zyx(image)\n";
makeImageID(source) + " = cle.push_zyx(image" + timepoint + ")\n";

program = program.replace("\n", "\n" + line_start );
return program;
Expand Down

0 comments on commit c2bc3d2

Please sign in to comment.