4DUltrasound

From NAMIC Wiki
Jump to: navigation, search
Home < 4DUltrasound

Timeline

Task Status Deadline
Create Dataset (3D RAW Volumes) -
Simulate scanner sending dataset -
Create 4D Ultrasound Module to show, load and save datasets -
Improve Module -
OpenCV Mitrale valve detection (Atsushi) -

Development

Create Dataset

  • Use data sent by James Barabas (MIT)
  • Convert them in several 3D Volumes (256*256*130), and fill with 0 on Matlab
  • Save data as raw volumes
  • Dataset available at the end of this page

Simulate scanner sending data to Slicer

  • Use ImagerClient from OpenIGTLink to send volumes
  • Change values to match with 3D Volumes created (values are hardcoded for now. cf Tips section. Need a parser ?)

Create 4D Ultrasound Module

  • Create module to create TimeSeries
  • Modified vtkMRMLNode to automatically saved any attributes (available on branch)
  • Used this modification to save TimeSerie ID to be able to load them and recreate TimeSerie
  • Need to add timestamp to know which node is the first, second, third, .... in the TimeSerie when reconstructing it
  • Use VolumeRendering module (now should be compatible with ATI graphic cards) to render timeseries
  • Add slider to move in the serie selected

Improve Module

  • NAMIC Winter Project Week 2012, Salt Lake City

OpenCV Mitrale valve detection (Atsushi)

Tips

  • To render TimeSerie, a DisplayNode (vtkMRMLScalarVolumeNode) has been created, and data of the ScalarVolumeNode selected are copied into the Data field of the DisplayNode. This has been made, to keep the VolumeRendering module pointing on the same memory space (our DisplayNode), so we don't have to refresh the node selected to update the rendering of the module.
  • INFO: OpenIGTLink Informations
    • svsize = size of the full volume (or picture)
    • spacing = size of the voxels
    • svsize = size of the sub-volume (a part of the volume)
    • svoffset = position of the center of the voxel (0,0,0)
      • TRICK: Offset in nrrd file indicate offset to the corner of the voxel. In OpenIGTLink, it represents the center of the voxel.
      • To calculate the offset to set on OpenIGTLink, use this equation:
        • OpenIGTLink_Offset = Corner_Offset ± (number_of_voxels * spacing)/2 - spacing/2
          • ± sign depends on the orientation of the coordinate system compared to RAS (example for LPS: - for L, - for P, + for S)
  • INFO: Convert gzip to raw using this command
    • unu data vol.nrrd | gunzip > vol.raw
  • INFO: Use this process to send file through OpenIGTLink
   //------------------------------------------------------------
   // size parameters
   int   size[]     = {130, 256, 256};       // image dimension
   float spacing[]  = {-1.3, 1.0, -1.0};     // spacing (mm/pixel)
   int   svsize[]   = {130, 256, 256};       // sub-volume size
   int   svoffset[] = {0,0,0};           // sub-volume offset
   int   scalarType = igtl::ImageMessage::TYPE_INT8;// scalar type
   //------------------------------------------------------------
   // Create a new IMAGE type message
   igtl::ImageMessage::Pointer imgMsg = igtl::ImageMessage::New();
   imgMsg->SetDimensions(size);
   imgMsg->SetSpacing(spacing);
   imgMsg->SetScalarType(scalarType);
   imgMsg->SetDeviceName("ImagerClient");
   imgMsg->SetSubVolume(svsize, svoffset);
   imgMsg->AllocateScalars();

Datasets

File:4DUltrasound-part1.tar.bz2

File:4DUltrasound-part2.tar.bz2