Ticket #7420 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Make LoadVTK an option for the load algorithm.

Reported by: Owen Arnold Owned by: Keith Brown
Priority: major Milestone: Release 2.6
Component: Framework Keywords: Student
Cc: Blocked By:
Blocking: Tester: Martyn Gigg

Description (last modified by Keith Brown) (diff)

Suggested by Nick as a good ticket for a student. Martyn, please reassign, or add to the Anyone list.

Use the file in the AutoTest directory as an aid for development. Unit tests for LoadVTK could also be extended to ensure that loading works via the Load algorithm.

Change History

comment:1 Changed 7 years ago by Martyn Gigg

  • Owner changed from Martyn Gigg to Anyone
  • Status changed from new to assigned
  • Keywords Student added

comment:2 Changed 7 years ago by Martyn Gigg

  • Owner changed from Anyone to Keith Brown

comment:3 Changed 7 years ago by Owen Arnold

As guidance, it would be sufficient to simply check the file extension (for *.vtk). LoadVTK itself performs some checks on the file format once it is loaded, which is fine. The operation is too expensive to perform as a quick check.

comment:4 Changed 7 years ago by Keith Brown

  • Status changed from assigned to accepted

comment:5 Changed 7 years ago by Keith Brown

Confidence method added

Confidence method is in and checks for a .vtk extension and if the file isn't ascii

Refs #7420

Changeset: 9c547634ce2931fb1407d798d5a88fd912200282

comment:6 Changed 7 years ago by Keith Brown

LoadVTK will now be elected when using the generic loader

LoadVTK will do 3 simple checks to determine how confident it is:

  • if the file isn't ASCII and ends in .vtk it's very confident (80)
  • if it ends in .vtk it's fairly confident (60)
  • if it's not ASCII it'll attempt it only if all other non-ascii loaders reject it (15)
  • otherwise it'll reject it (0).

LoadVTKTest will now check to see if the generic loader returns a not-null object

Refs #7420

Changeset: 87b473db3a14dab787fe89c37227b38cc0327e4b

Last edited 7 years ago by Keith Brown (previous) (diff)

comment:7 Changed 7 years ago by Keith Brown

Reduced calls to FileDescriptor::isAscii()

FileDescriptor::isAscii() is now only called once, and the result is stored

Refs #7420

Changeset: 8d371d7ea72d8e9d5065910285c3b68c13b7946e

comment:8 Changed 7 years ago by Keith Brown

  • Status changed from accepted to verify
  • Resolution set to fixed
  • Description modified (diff)

comment:9 Changed 7 years ago by Keith Brown

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:10 Changed 7 years ago by Keith Brown

  • Status changed from reopened to accepted

comment:11 Changed 7 years ago by Keith Brown

Reopened to fix unit tests

comment:12 Changed 7 years ago by Keith Brown

Fixed unit tests to check for no throws

Was my fist time altering a unit test so i didn't know quite how it worked.

I was told to use TS_ASSERT_THROWS_NOTHING on the last two lines instead

Refs #7420

Changeset: 2e4120b1c65c696f9df2ad74a4724d1cfdbd64ea

comment:13 Changed 7 years ago by Keith Brown

  • Status changed from accepted to verify
  • Resolution set to fixed

Unit tests passed

To test, load a valid .vtk file in via the generic loader. LoadVTK should take over.

comment:14 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:15 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/7420_LoadVTK_register'

comment:16 Changed 7 years ago by Nick Draper

  • Component changed from VATES to Framework

comment:17 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8266

Note: See TracTickets for help on using tickets.