Thursday, September 22, 2016

fileReadUpdate

code was looked over again and several issues noted:

# the image display loop did not correspond with the reading of pixels
# the display of read images loops infintely
# writing to a 3DArray was obsolete as we are only reading luminance information
# the data from each image in the stack was being written to disk separately - was deemed more unified to have all data in one file - which means knowing how to divide / modulate the bits upon reading
----------------------------------------
After further development
----------------------------------------
A list is used to add all luminance values sequentially
All values for all images in a stack are written to one file
A header is added containing image width, height and stack size
ascii output option removed

The "image Reader" reads the pixels for each image before displaying the next image in the display "Form"

new problems: (fixed)
if the file already exists, it is appended to
a new file should be made with an incremented suffix before the file extension

with FileMode.Create mode any existing file is overwritten

testing for file existence link:
https://www.dotnetperls.com/file-exists
----------------------------------------
to do:
----------------------------------------
revise tif floating point details so data can be read properly

there needs to be an image size limit and bitmap stack limit to be checked for
The form size is fixed - its is not being read from the image (from the seq) size
read and write times and feedback to the user in the console
console arguments/options

keep the image Form on top of other windows:
https://msdn.microsoft.com/en-us/library/aa984361(v=vs.71).aspx
----------------------------------------
notes:
----------------------------------------
Test sequential images are png files
a default float  type in c# is 32bit, 4 bytes, therefore the header uses 12 bytes.

image width, height, stack 'depth'
all subsequent values are floating point luminance values

A smaller data unit could possible be used

code:
https://docs.google.com/document/d/1udKRnybNhA2uYiszSP27vyKUWdabEduRkFPRZZztAVc/edit?usp=sharing

No comments:

Post a Comment