Open ewiger opened 9 years ago
If ownMIPs==true
then create_jpgs generates own MIPs on the fly. By default ownMIPs is set to true.
Image filenames that I have found in TIFF folder of the project (mentioned in the log above) look as following: P1_150901IL004_D06_T0001F005L01A01C04.png
, i.e. there is no part indicating that this is a z-stack image Z00*
.
So far, so good.
The problem starts when function check_image_position()
is called, which ignores filenames without Z00*
substring.
>> check_image_position('P1_150901IL004_D06_T0001F005L01A01C04.png')
Error using check_image_position (line 130)
unknown file name P1_150901IL004_D06_T0001F005L01A01C04.png
>> check_image_position('P1_150901IL004_D06_T0001F005L01A01Z01C04.png')
ans =
5
Possible solutions to this problem would be:
1) Modify creation of MIPS such that Z00 always added to every Z-stack. 2) Modify regular expression in https://github.com/pelkmanslab/iBRAINShared/blob/master/iBRAIN/CreateJpgsOverview/create_jpgs.m to have Z00 substring optional.
I am in favor of the second option. But this has to be documented in the code so that future developers are aware of difference in naming convention
A MIP image has no
Z\d+
substring A Z-plane image hasZ\d+
substring
@SaadiaIftikhar what do you think?
2nd option seems better. Did you work on jpeg and illumination creation at the same time? What would be the logical way to go to fix this bug?
General approach is:
check_image_position
into LIB/MATLAB
folder. This will allow to test the fix.OK I am following option 2. I placed the fix that should work in my opinion into LIB/MATLAB of Ilya's project.
@SaadiaIftikhar can you test it on the whole project?
I am posting this into an issue in case it might be of general interest.
log: