08-22-2008 05:59 AM
Thank you Mike!
Well even if you don't want to Nuggetize it you still earned a couple of tags that the forum really needed.
Thank you!
I'll try to take a look this week-end.
Ben
08-24-2008 09:13 AM - edited 08-24-2008 09:18 AM
Hi Mike!
Nice code!
There was simply too much work put into this code for me to just leave it at that, so I'll try to document what you have done and ask questions as I go. Please don't take any of the following negatively. I am sure that there are many other developers that would jump all over some of my comments, since there is a lot of flexibility in good style. These would the same comments I would make if another one of my co-workers asked me to review their code.
It looks like the top level Vi is named "Gif.Main.vi". I have never seen anyone use a dotted notation like that before. Is that just your preference, or is that a standard you picked up?
THis prompts an open question to all. When using a naming convention where the the name starts with the name of the function like, how do you handle sub-VIs that can be shared across multiple functions? e.g. Say you had gif.ReadFile.vi, it could be re-used in a JPG function?
You structureed Gif.Main.vi such that it was implelemtned as a State Machine. Nice! THe code you have developed and shared already exibits the flexibility of this architecture with handling the multiple file formats.
Q
You have used strings to control the SM states, Do you prefer them to using a type-def'd enum?
I used to use strings back in LV 6 but switched over to enums. Yes I still have code that I have been re-using since then that still use strings.
Comment: I have tried to use "Case Insensitive Match" for string control case structures. I'm pretty bad when it comes to the shift key.
Open Style Q
I often will drag all of my shift registers to the top of the SM structure. I do this to keep my states more open and to avoid having to dodge wires that are not used in every state. I even do this with the SR that controls my state transitions. But even in my beloved State Diagram Editor, NI decided the transitions should be at the bottom.
How do YOU manage the SR's in SM?
So after reading the contents of the file and save the contents and length in a SR you proceed to read the header.
In this state "Gif.Header.vi" is used to decode the part of the header to find Signature" and Version. These values are used to determine if the format is a GIF and the right type of GIF.
Qs
What is with "89a" ?
Could the 6 characters pulled out in "Gif.Header.vi"have been used to drive a string case structure? Any time I see more than one select node I start thinking "can I do this with a case to make it easier to read?
After this you proceed to "next"
...where Gif.LogicalScreenDescriptor.vi uses some strategic use of typecasts, data manipulation, and bit-wise logical operators to pull out all of the fields.
Nice.
Then you pull out the color table in Gif.ColorTable.vi which was implemented rather elegantly!
Could you comment a little on Gif.CreatePictureArray.vi? That Action Engine is just a little too much for my Sunday morning before coffee brain to decypher.
I'll stop here.
NICE, NICE, NICE, NICE!
Ben
08-24-2008 09:20 AM - edited 08-24-2008 09:24 AM
more images
08-24-2008 09:26 AM
Hi Ben,
thanks for writing the comments. After reading it i decided to write a description for what i have done so far. It will be the first time, a use the Code Capture Tool.
To some of your questions:
I will post the detailed description as soon as possible. I think at the next weekend.
Once again, thanks for reaing the code and your interest.
Mike
09-01-2008 01:46 PM
Hi Ben,
sorry for the delay, i´m still writing.
Mike
09-10-2008 01:53 AM
Hi Ben,
here is the first version of the description. I would be pleased to here your comments. If you have further questions, don´t hesitate to ask, i will then extend the document.
Mike
09-10-2008 01:59 AM
Mike I just saw a overall glance at the pdf. Looks interesting. Tonight, i will read it fully.
Very nice work indeed.
Thanks,
Mathan
09-10-2008 07:31 AM
Mega-Kudos to you Mike!
That looks like it was worth waiting for. I just printed a hard-copy so I can review it in detail (believe it or not, I don't have a pdf reader on my machine at home).
I will comment more after I have read this thoroughly.
Ben
10-02-2008 03:52 PM
This was a briliant approach to solving this problem and love the way the program was written.
I just downloaded and have only looked at it for 5 minutes but i intend to utilize this code for frame acquisition in my senior design project (Motion Estimation).
So far it works well but i have noticed that it does not work for larger sized images (suspecting images that are larger than 200x200)
I'll update this thread once i get more specifics and study the code some more
Tutu
10-03-2008 02:34 AM
Hi Tutu,
can you upload one of your big gif files?
Mike