Skip to content

Modify image loading to load the associated csv file #5

@apsexton

Description

@apsexton

The data folder contains sample images and associated .csv files.

  • When an image is loaded, try to read the associated .csv file (giving suitable error dialogs if the file doesn't exist).
  • Make a class called Component in Layout.Model to hold the contents of a single line of the csv file. For the moment, we are only interested in the bounding box information (the x, y, w and h columns) and the columns in the csv file may change later in the project anyway so ignore the other columns
  • Have the class have a Rectangle class variable initialised to these values.
  • Add an ArrayList of Component objects to the Model.
  • On reading the .csv file, add all the resulting Component objects to the model (after clearing any previous Components from the ArrayList)
  • Modify the canvas display to draw all the rectangles in the list of components in some suitable stand out colour.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions