QSolutionsLLC / cornerstone-vtk-mpr

MIT License
36 stars 19 forks source link

How can I get or remove ReferenceLine? #8

Open aizela opened 3 years ago

aizela commented 3 years ago

I move this project to react,each file is the same as this. except the way to show UI:

<button onClick={_changeMode}>click to show MPR or hide</button>
 <div id="cornerstone-target" class="item"></div>
      {mode === 0 ? null : <div className="mpr-comtainer">
        <div id="axial-target" class="item"></div>
        <div id="coronal-target" class="item"></div>
        <div id="sagittal-target" class="item"></div>
      </div>}

when i click the button first,everything goes well, but when MPR showed again,col lines on the MPR will show one extra. I think it can be resolved by remove lines before the image shown, or determine whether a line already exists before rendering, but i failed to do