CS321 -- Lab 7: Image-it



->Courses
->CS321
-->Presentation
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
-->Lab 6
->Lab 7
-->Lab 8
->Electronic Submission
->Old Exams
->C++ Examples
->Unix Help
->Software
->Tentative Schedule
->Support Forum
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Fall Quarter 2002

Purpose

The purpose of this lab is to continue developing skills using an unfamiliar C++ library.

Acknowledgement

This lab was inspired by Dr. Russ Meier.

General Lab Information

Design a basic Unix Qt application that will display an image and optionally overlay text annotations on the image. The application should take command line arguments. The command line should have the following form:

display imageFilename [annotationsFile fontFile [color]]

Keep in mind:

  • Color specifies the color of the text overlaid on the image.
  • Arguments in square brackets are optional. For example, one should be able to call your application with just display imageFilename, with display imageFilename annotationsFile fontFile or with display imageFilename annotationsFile fontFile color.
  • At a minimum, your program should be able to read XPM format files.
  • The annotations file should have a separate line for each annotation. Each line should be in the following format:
    x y Annotation
    
    where x and y specify the location in the image where the bottom left pixel of the first character in the annotation should appear, and Annotation is the text annotation (which may be more than one word).
  • The font file should have a separate line for each 8x8 character. Each line should be in the following format:
    character byte0 byte1 byte2 byte3 byte4 byte5 byte6 byte7
    
    where character is the character whose bitmap is being defined on this line and byte0 represents the first row of pixels, byte1 represents the second row of pixels, etc....
  • You need only support uppercase alphanumeric characters (ABC...Z012...9); however, you may support more if you wish.
  • Your program should perform error-checking on the number of command line arguments as well as the input file format.
  • The main widget must be a designed class that derives from QWidget and overrides only the protected virtual void paintEvent function.
  • The QImage may prove helpful.
  • You may share font files, but you should be prepared to explain how the file was generated.

Application demonstration

You should demonstrate the successful operation of your application before the end of week 10 lab.

Lab report (due 4pm, the day of week 10 lab)

No lab report is required for this assignment. Instead, you should tar all of the files necessary to compile, build, and execute your program. (See this page if you have questions on how to use tar.) You should attach this file to an email message to me along with a time log and brief discussion of the most interesting thing you learned while doing this assignment.

If you have any questions, consult the instructor.

© 1998-2002 Dr. Christopher C. Taylor Office: CC-27C Phone: 277-7339 Last Updated: Fri Nov 8 12:43:57 2002
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.