Skip to content

Add get OriginalFileContent.m for possible consumption by getFileAnnotationContent#4502

Merged
jburel merged 4 commits intoome:developfrom
imunro:orignalFileContent
Apr 14, 2016
Merged

Add get OriginalFileContent.m for possible consumption by getFileAnnotationContent#4502
jburel merged 4 commits intoome:developfrom
imunro:orignalFileContent

Conversation

@imunro
Copy link
Copy Markdown
Contributor

@imunro imunro commented Feb 29, 2016

Add get OriginalFileContent.m for possible consumption by getFileAnnotationContent

% Input check

if ~isa(originalFile, 'omero.model.OriginalFileI'),
assert(isLoadedFA(fileAnnotation),...
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sbesson
Copy link
Copy Markdown
Member

sbesson commented Feb 29, 2016

Reads fine to me. Do you want to simplify https://github.com/openmicroscopy/openmicroscopy/blob/v5.2.2/components/tools/OmeroM/src/annotations/getFileAnnotationContent.m#L55 to call getOriginalFileContent(session, fileAnnotation.getFile(), path)? This should allow this new function to be tested as part of the WriteData.m training example.

@imunro
Copy link
Copy Markdown
Contributor Author

imunro commented Feb 29, 2016

I can do but it's tricky for me to test. Is it tested automatically?

@sbesson
Copy link
Copy Markdown
Member

sbesson commented Feb 29, 2016

@snoopycrimecop
Copy link
Copy Markdown
Member

Conflicting PR. Removed from build OMERO-DEV-merge-push#257. See the console output for more details.
Possible conflicts:

  • Conflict detection failed
    • None

@snoopycrimecop
Copy link
Copy Markdown
Member

Conflicting PR. Removed from build OMERO-DEV-merge-push#258. See the console output for more details.
Possible conflicts:

  • Conflict detection failed
    • None

@sbesson sbesson changed the title Add get OriginalFileContent.m for possible consumption by getFileAnno… Add get OriginalFileContent.m for possible consumption by getFileAnnotationContent Mar 1, 2016
@mtbc
Copy link
Copy Markdown
Member

mtbc commented Mar 13, 2016

@imunro: Needs relisting for review?

@imunro
Copy link
Copy Markdown
Contributor Author

imunro commented Mar 13, 2016

Well spotted Mark thanks.

@jburel
Copy link
Copy Markdown
Member

jburel commented Apr 14, 2016

Example is green, works as expected. Updating the retrieval to large files will probably be part of the "download" epic unless @sbesson has already a card.

@jburel jburel merged commit 1e6e688 into ome:develop Apr 14, 2016
@imunro imunro deleted the orignalFileContent branch April 14, 2016 13:34
@jburel jburel added this to the 5.2.3 milestone May 4, 2016
% Read data and cast into int8
fid = fopen(path, 'w');
byteArr = store.read(0,originalFile.getSize().getValue());
fwrite(fid,byteArr,'*uint8');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imunro: sorry for missing this change when the PR was reviewed. What is the rationale for using *uint8 instead of int8? Note this casting has caused some regressions https://www.openmicroscopy.org/community/viewtopic.php?f=6&t=8117

Copy link
Copy Markdown
Contributor Author

@imunro imunro Sep 9, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there was a rationale I certainly can't remember it now. My suspicion is that I copied from some code I already had working. Sorry about the regression.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants