Internal:PODM 3D

From crtc.cs.odu.edu
Revision as of 19:21, 7 September 2020 by Spyridon97 (talk | contribs) (→Fall 2020)
Jump to navigation Jump to search

Documentation

Fall 2019

  1. Read PODM3D paper✔
  2. Read Guaranteed Quality Tetrahedral Delaunay Meshing for Medical Images paper (Sect. 9) (TODO)
  3. Write a proper README.md file✔
  4. Add the CNF Example Meshes into the Appendix of the November Report✔
  5. Create CNF Adaptivity Report

Spring 2020

  1. Create a User Manual for PODM 3D and Tessellate2D within the fields of Medical Image Computing and Computational Nuclear Femptography ✔

Execution Examples

Fall 2019

  1. Create meshes for the Computational Nuclear Femtography part of CRTC_I2M_Suite Documentation. CNF Example Meshes ✔

Spring 2020

  1. Create meshes for the Medical Image Computing part of CRTC_I2M_Suite Documentation. Medical Imaging Example Meshes ✔

Summer 2020

  1. Create meshes for the Bioinformatics part of CRTC_I2M_Suite Documentation. Bioinformatics Example Meshes ✔

Code

Fall 2019

  1. Restructure repository of PODM3D based on Software engineering standards✔
  2. Decouple Args from PODM✔
  3. Create setArguments function✔
  4. Create setInputImage(ImageType::Pointer)✔
  5. Remove IOs from PODM✔
  6. Implement a sizing function that will work as an extra rule and it will use the point indices of the tetrahedron that is tested✔
    1. Create UML diagrams to understand the code and the Meshing Procedure in general✔
    2. Create a list of functions that need to be modified to implement the extra Rule ✔
    3. Modify the created list (Extra Rule sizing Function list) of functions✔
    4. Create the following test sizing function to understand if modifications have been done correctly✔
      bool checkSizingFunction(double coordinatesOfTetrahedron**)
      {
          double volume = volume(coordinatesOfTetrahedron);
          double* baryCenter = baryCenter(coordinatesOfTetrahedron)
          
          // if x axis <= 55 and volume of tetrahedron > 10
          if (baryCenter[0] <= 55 && volume > 10)
             return true;
          else
             return false
      }
      
    5. Create the infrastructure to support Sizing Function pointer✔
    6. Incorporate Function Pointer to PODM by creating a setSizingFunction()✔
    7. Replace the test sizing function with the Adaptivity function that was created by Christos (The algorithm is described here)✔
      1. Understand that the current implementation supports negative weights✔
      2. Change the current implementation to use the minimum-maximum edge length of the element instead of its volume✔
      3. Identify an issue of checking sample points outside the image and solve it according to Christos's suggestions✔
  7. Separate the interface, the IOs and the filters from PODM✔

Spring 2020

  1. Create a general PODM driver✔
  2. Set a warning if delta > min-spacing * min-dimension-size / 5✔
  3. Set a default delta: ✔
    1. if sizing-function is off then default delta = min-spacing * min-dimension-size / 100 ✔
    2. if sizing-function is on then default delta = min-spacing * min-dimension-size / 20 ✔
  4. Remove labels array if there is only 1 label of interest ✔
  5. Print a warning if a label is not recovered✔
  6. Add Numa flag in CmakeLists.txt ✔
  7. Add binary file support ✔
  8. Improve Text output ✔
  9. Create label-filter to filter labels of images properly ✔
  10. Remove redundant volume threadhold checks that don't contribute anything to the meshing procedure ✔

Summer 2020

  1. Libraries:
    1. Update ITK to v5.1.0 ✔
    2. Update VTK to v9.0.1 ✔
    3. Remove Boost from PODM (preserve it only for CGAL) ✔
  2. Save the label of a cell after its creation and Remove the expensive label recalculation in GetCleanMesh/GetCleanMeshParallel✔
  3. Compute Mesh Results in Parallel (TODO)
    1. Implement Parallel version of GetCleanMesh function ✔
    2. Testing ✔
    3. Speed-Up File:mesh-results-speed-up.png ✔
    4. Assigned as default ✔
  4. Compute Box, Resized image and surface in Parallel ✔
    1. Implement Parallel version of ComputeBoxAndSurface function ✔
    2. Testing ✔
    3. Speed-Up File:box-surface-speed-up.png✔
    4. Assigned as default ✔
  5. Sizing function:
    1. Control min edge and max edge using a percentage of the diagonal ✔
    2. Find values of samples points using linear interpolation ✔
  6. Make Image segmentation use spacing and origin ✔

Fall 2020

  1. Handle CNF images with spacing different than 1✔
    1. Upgrade Image Segmentation ✔
    2. Upgrade Sizing function ✔
    3. Upgrade Linear Interpolation ✔
  2. Fix shift of origin if delta not multiple of the spacing ✔
  3. Fix IO_WRITING truncation error when loading box ✔
  4. Replace BBox with itkBoundingBox if possible (TODO)
  5. Fix PODM not working on Wahab
  6. Remeshing by using a mesh instead of an image as input and background mesh (TODO)
  7. Set Absolute bounds of image (TODO)
    1. For Getlabel
      1. Implement TransformPhysicalPointToIndexWithBounds
      2. Replace TransformPhysicalPointToIndex with TransformPhysicalPointToIndexWithBounds
      3. Constrain bounds of mesh by editing GetLabel:
        1. Code Example of constraining using image's bounds✔
          unsigned char GetLabel(const Attributes& attr, const Point& p)
          {
              IndexType pixel_index;
              if (attr.ResizedImage->TransformPhysicalPointToIndex({p[0], p[1], p[2]}, pixel_index) ) {
                  if (!(pp[0] < this->initial_image_origin[0]
                        || pp[0] > (this->initial_image_size[0] - 1.0) * this->initial_image_sp[0] + this->initial_image_origin[0]
                        || pp[1] < this->initial_image_origin[1]
                        || pp[1] > (this->initial_image_size[1] - 1.0) * this->initial_image_sp[1] + this->initial_image_origin[1]
                        || pp[2] < this->initial_image_origin[2]
                        || pp[2] > (this->initial_image_size[2] - 1.0) * this->initial_image_sp[2] + this->initial_image_origin[2])) {
                      return attr.ResizedImage->GetPixel(pixel_index);
                  }
              }
              return 0;
          }
          
        2. This is needed because TransformPhysicalPointToIndex truncates to the closest integer, and therefore it accepts +-0.5 values out of the boundary
    2. For everything else
      1. Implement TransformPhysicalPointToBoundedIndex
      2. Replace TransformPhysicalPointToIndex with TransformPhysicalPointToBoundedIndex
  8. Create upscale-image-filter (TODO)
  9. Replace CGAL Predicates with: (TODO)
    1. Predicates Construction Kit:
      1. Paper
      2. Code
      3. Benchmark: PCK vs CGAL Predicates Benchmark
      4. Note: see Geogram branch
    2. Adaptive Precision Floating-Point Arithmetic and Fast Robust Predicates for Computational Geometry:
      1. Paper
      2. Code
  10. Smoothing (TODO)
    1. CGAL Sources:
      1. https://doc.cgal.org/latest/Mesh_3/index.html
      2. https://doc.cgal.org/latest/Mesh_3/index.html#fig__mesh3protectionimage3D
      3. https://doc.cgal.org/latest/Mesh_3/index.html#fig__mesh3HybridDomainExample
    2. PODM3D citations:
      1. Volume conserving smoothing for piecewise linear curves, surfaces, and triple lines
      2. An anisotropic scale-invariant unstructured mesh generator suitable for volumetric imaging data
      3. Variational generation of prismatic boundary-layer meshes for biomedical computing, International Journal for Numerical Methods
    3. Prof, Andrey Suggestions:
      1. Isosurface Stuffing: Fast Tetrahedral Meshes with Good Dihedral Angles
      2. CERTIFIED FUNCTIONS FOR MESH GENERATION
      3. GENERALIZED INSERTION REGION GUIDES FOR DELAUNAY MESH REFINEMENT
  11. Μultiple δ (TODO)
    1. Implement multiple δ (TODO)
    2. Use different δ values (possibly uniform based) according to the surface of each label of a segmented image (TODO)
  12. Produce the Voronoi Mesh out of the Delaunay (TODO)
    1. Check what TetGen does (TODO)
    2. Research conversion methods (TODO)