Ticket #7252 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Load legacy vtk files into the MDWorkspace structure

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

Description (last modified by Nick Draper) (diff)

This is an exploratory piece of work requested by Jon Taylor, based on the vtk data file fly.vtk, which contains a real-space 3D image of a fly head.

Generate a new algorithm called LoadVTK, which will read a vtk file and output a 3D IMDWorkspace.

Attachments

Screen Shot 2013-06-07 at 12.35.10.png (690.5 KB) - added by Owen Arnold 7 years ago.

Change History

comment:1 Changed 7 years ago by Owen Arnold

  • Status changed from new to accepted

comment:2 Changed 7 years ago by Owen Arnold

refs #7252. Algorithm template.

Changeset: b3dc737b7469a5f5cda3a6be793cc7ce2b8edbe1

comment:3 Changed 7 years ago by Owen Arnold

refs #7252. Read metadata into md histoworkspace.

Changeset: 7353c11df611a4040c3697453ce22508aa9f20ec

comment:4 Changed 7 years ago by Owen Arnold

refs #7252. Properties to specify vtkDataArray names

Changeset: 301978b7609b5a995813603a11762c852e7c1b83

comment:5 Changed 7 years ago by Owen Arnold

refs #7252. And Import the data too.

Changeset: 1aeffbac24ab417f94a7f1d1f1c9b43a64e0f0ac

comment:6 Changed 7 years ago by Owen Arnold

Data was taken from the Paraview examples. Used the paraview python filter to add two scalar arrays of type unsigned int onto the original data. python is as follows:

pdi = self.GetInput()
pdo = self.GetOutput()
newData = vtk.vtkUnsignedShortArray()
newError = vtk.vtkUnsignedShortArray()
newData.SetName("scalar_array")
newError.SetName("error_array")
npoints = pdi.GetNumberOfPoints() 
for i in range(npoints):
  newData.InsertNextValue(10)
  newError.InsertNextValue(1)
pdo.GetPointData().AddArray(newData)
pdo.GetPointData().AddArray(newError)

comment:7 Changed 7 years ago by Owen Arnold

refs #7252. Reporting and test updates.

Changeset: b11a430cfede07a05f587a9a8aa669d27c15e9ac

comment:8 Changed 7 years ago by Owen Arnold

refs #7252. Merge branch 'feature/7252_load_vtk' into develop

Conflicts:

Code/Mantid/Framework/Algorithms/src/IntegrateByComponent.cpp

Changeset: 9d9593886c9290b3ab339f17905ff40997b7b94a

comment:9 Changed 7 years ago by Owen Arnold

refs #7252. Fix OpenMP loop on windows.

Changeset: 084b31394565dfbd83501ae9cae7692348e16d96

comment:10 Changed 7 years ago by Owen Arnold

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

Changed 7 years ago by Owen Arnold

comment:11 Changed 7 years ago by Owen Arnold

Tester:

You'll need to be located at ISIS to do the following. Load the Fly.vtk dataset currently in the \Olympic\Babylon5\public\mantid directory into Mantid using LoadVTK. Open it in the slice viewer and you should see something similar to the attached image.

comment:12 Changed 7 years ago by Owen Arnold

refs #7252. Algorithm template.

Changeset: e6048a8af990e9179622c753cfa32d114b4bdd1a

comment:13 Changed 7 years ago by Owen Arnold

refs #7252. Read metadata into md histoworkspace.

Changeset: 39ff44181b83c92be4046784341383037ec5beee

comment:14 Changed 7 years ago by Owen Arnold

refs #7252. Properties to specify vtkDataArray names

Changeset: 0c201b2d4e2dad6c891bc3f5651461c8feafc865

comment:15 Changed 7 years ago by Owen Arnold

refs #7252. And Import the data too.

Changeset: 427b83a3301db61d831e530e6a0d2a817cf8ac59

comment:16 Changed 7 years ago by Owen Arnold

refs #7252. Reporting and test updates.

Changeset: 548bbf1f3ff3b7cb5d6f09cce48ae37fccdbe2f2

comment:17 Changed 7 years ago by Owen Arnold

refs #7252. Fix OpenMP loop on windows.

Changeset: c3d195d178100ce5048dc636f01244fcf34fe76a

comment:18 Changed 7 years ago by Owen Arnold

refs #7252. Implement thresholding on image.

Changeset: 80f2a10501ce9c4f0210e1948d50e2a970ac89ac

-- This was a mistake. should have gone against 7264

Last edited 7 years ago by Owen Arnold (previous) (diff)

comment:19 Changed 7 years ago by Martyn Gigg

Needs a memory check as the current layout of MDHistoWorkspaces requires one contigous array for all of the data and allocating this can kill a machine without enough memory.

comment:20 Changed 7 years ago by Owen Arnold

refs #7252. Add predicted size check.

Changeset: a17060aa8b75e3c2d70bca8e0367808e8f0cd9d3

comment:21 Changed 7 years ago by Martyn Gigg

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

comment:22 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to reopened
  • Resolution fixed deleted

I still get all of my memory being used. I think the check is in the wrong place as it is the MDWorkspace constructor that is allocating the large chunk of memory so the check needs to go before that.

There is also a memory leak if the algorithm aborts due to there not being enough memory as the output->Delete() is never called.

comment:23 Changed 7 years ago by Owen Arnold

refs #7252. Further fix memory issues.

Changeset: 38b8b4e30b60a127fece9b073409eec7e2f8f764

comment:24 Changed 7 years ago by Martyn Gigg

  • Status changed from reopened to accepted
  • Owner changed from Owen Arnold to Martyn Gigg

comment:25 Changed 7 years ago by Owen Arnold

  • Status changed from accepted to assigned
  • Owner changed from Martyn Gigg to Owen Arnold

comment:26 Changed 7 years ago by Owen Arnold

  • Status changed from assigned to accepted

comment:27 Changed 7 years ago by Owen Arnold

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

comment:28 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying

comment:29 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

I can now successfully load the iron_protein but get an error about the fly data set as expected.

comment:30 Changed 7 years ago by Owen Arnold

  • Blocking 7305 added

comment:31 Changed 7 years ago by Nick Draper

  • Component changed from VATES to Framework
  • Description modified (diff)

comment:32 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8098

Note: See TracTickets for help on using tickets.