# One control point out of many is read incorrectly into Slicer

**URL:** <https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369>\
**Category:** Support\
**Tags:** markups\
**Created:** [September 13, 2024, 6:07pm UTC](https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369 "2024-09-13T18:07:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)\
**Post date:** [September 13, 2024, 6:07pm UTC](https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369/1 "2024-09-13T18:07:51Z")

</div>

I have [this mrk.json file](https://app.box.com/s/a3nbgdr9q86asf5qrdeaxn5jqesku80m) that generated from our SlicerMorphR package. When this file is loaded into the scene, control point 121 (alignedPoints-121) points gets undefined (see the screenshot below).

But it is defined in the file.

```auto
          "id": 120,
          "label": "alignedPoints-120",
          "position": [4.9336, 11.6169, 0.0273],
          "orientation": "[-1.0, -0.0, -0.0, -0.0, -1.0, -0.0, 0.0, 0.0, 1.0]",
          "selected": true,
          "locked": false,
          "visibility": true,
          "positionStatus": "defined"
        },
        {
          "id": 121,
          "label": "alignedPoints-121",
          "position": [5.6459, 11.6355, 0],
          "orientation": "[-1.0, -0.0, -0.0, -0.0, -1.0, -0.0, 0.0, 0.0, 1.0]",
          "selected": true,
          "locked": false,
          "visibility": true,
          "positionStatus": "defined"
        },
        {
          "id": 122,
          "label": "alignedPoints-122",
          "position": [4.7923, 11.4034, -0.0187],
          "orientation": "[-1.0, -0.0, -0.0, -0.0, -1.0, -0.0, 0.0, 0.0, 1.0]",
          "selected": true,
          "locked": false,
          "visibility": true,
          "positionStatus": "defined"
        },

```

I am not sure what’s going on or how to debug this. This is with the latest stable. Any pointer is much appreciated.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/f/ef6db8c9578fab5353082ccf330ad049af813d61.png)

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [September 13, 2024, 6:44pm UTC](https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369/2 "2024-09-13T18:44:22Z")

</div>

> [@muratmaga](#):
>
> `"position": [5.6459, 11.6355, 0],`

By setting the Z position value to 0.0, the error message does not appear in the python console. The reader seems to strictly interpret integers and doubles.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 13, 2024, 7:03pm UTC](https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369/3 "2024-09-13T19:03:59Z")

</div>

Good catch, I’ve submitted a pull request with the fix:

> <https://github.com/Slicer/Slicer/pull/7928>
>
> When markup point position was defined as an integer (0) instead of float (0.0) …the markup reader rejected the position value. The problem was that the code only accepted double type. Fixed by accepting any numeric type.
> 
> Fixes issue reported at https://discourse.slicer.org/t/one-control-point-out-of-many-is-read-incorrectly-into-slicer/38369
