iMSTK
Interactive Medical Simulation Toolkit
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
FemurObject.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkLevelSetDeformableObject.h"
10 
11 #include <unordered_set>
12 
13 namespace imstk
14 {
15 class LocalMarchingCubes;
16 class TaskNode;
17 } // namespace imstk
18 
19 using namespace imstk;
20 
30 {
31 public:
32  FemurObject();
33  ~FemurObject() override = default;
34 
35  bool initialize() override;
36 
42  void visualUpdate() override;
43 
48  void createVisualModels();
49 
50  void setUseRandomChunkColors(const bool useRandom) { m_useRandomChunkColors = useRandom; }
51  bool getUseRandomChunkColors() const { return m_useRandomChunkColors; }
52 
53 protected:
58  void updateModifiedVoxels();
59 
63  virtual void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink) override;
64 
65 protected:
66  std::shared_ptr<LocalMarchingCubes> m_isoExtract;
67  std::unordered_set<int> m_chunksGenerated; // Lazy generation of chunks
68  std::shared_ptr<TaskNode> m_forwardModifiedVoxels;
69  bool m_useRandomChunkColors = false;
70 };
Base class for TaskGraph nodes.
Definition: imstkTaskNode.h:20
Compound Geometry.
Base class for scene objects that move and/or deform under position based dynamics formulation...
This filter extracts a contour SurfaceMesh from an image given an isovalue. Users should prefer imstk...
The FemurObject implements a localized marching cubes. That is we&#39;ve split up an image into a bunch o...
Definition: FemurObject.h:29