cs31 lecture 14

Printimage imprintimage 4 the first question what

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: plySmooth(); im.printImage(); im.printImage(); 4 The first question: what class hierarchy? x Question 1: what are the various objects the user needs to Question manipulate? manipulate? x Question 2: what is common between those objects, i.e., Question what are common abstractions? what x Question 3: how to ensure the software will be extensible Question for future use? (new algorithms, new image types) for x Question 4: are the algorithms specific to a 2D image, or Question are they more generic? are 1D image == a sound wave 3D image == a volume 5 The first question: what class hierarchy? x Question 5: what are the image parameters that can be Question changed by the user? changed Image size? Color representation? Color 6 Example of a design 7 Reminder: good programming habits x Check the hierarchy complies with the “is a” and Check “extends” tests “extends” x Encapsulate all data, and provide accessors/mutators x Provide default constructor/copy constructor/destructor x Avoid multiple/diamond inheritance 8 Implementing the methods 9 The question of extensibility x A smooth algorithm needs the notion of pixel neighbor A generic implementation for nD images is possible? x An image is a collection of pixels, the pixel dimensionality An determines the image dimensionality? determines x Getting/setting a pixel: use a method More convenient writing using the operator [ ] possible? 10 Final design 11...
View Full Document

Ask a homework question - tutors are online