# Inconsistency with returned ScalarType in vtkPointData (from vtk 9.0.3 onwards)?

**URL:** https://discourse.vtk.org/t/inconsistency-with-returned-scalartype-in-vtkpointdata-from-vtk-9-0-3-onwards/9304
**Category:** Support
**Created:** [September 9, 2022, 3:26pm UTC](https://discourse.vtk.org/t/inconsistency-with-returned-scalartype-in-vtkpointdata-from-vtk-9-0-3-onwards/9304 "2022-09-09T15:26:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Seun](https://discourse.vtk.org/user_avatar/discourse.vtk.org/seun/32/767_2.png) [@Seun](https://discourse.vtk.org/u/Seun)
#### Post date: [September 9, 2022, 3:26pm UTC](https://discourse.vtk.org/t/inconsistency-with-returned-scalartype-in-vtkpointdata-from-vtk-9-0-3-onwards/9304/1 "2022-09-09T15:26:13Z")

</div>

Hello everyone,

Does anyone know if by chance something changed in vtkPointData with respect to retrieving its scalars. I’m not quite sure of what I’m observing in my application and would like to get to the bottom of it, I’m currently reading PLY files using vtkPLYReader and at first I noticed that there could be some PLY files (ie: like mine) that have the colours saved in the Cell-Data whereas others could be saved in Point-Data (in either RGBA or RGB) depending on how the PLY file was exported (at least as far as I understand).

Now, since my application is setup in a way that we only process points during rendering (and not faces), my approach was to use `vtkCellDataToPointData` to first convert the cell-datas colour information to point-data colour format. This seems to work as I can visually test this in my application.

> The issue arises when I’m running unit-tests at my end to test the scalars I’m actually getting back from the PLY read and converted by the `vtkCellDataToPointData` and there I noticed that when I call `GetScalars(...)->GetDataType()` prior to vtk9.0.3 the results return `VTK_UNSIGNED_CHAR` whereas from vtk 9.0.3 onwards it returns `VTK_FLOAT` for the same test PLY file(s) I have.

I had a look at `VTK/Documentation/release` and nothing jumps at me that may have caused it. Does anyone have any idea what could have happened? it’s a bit daunting to search git log for all possible changes in ie: vtkDataAttributes, vtkPointData, vtkCellData and vtkCellDataToPointData if I don’t know exactly where the change occurred if any at all.

Thanks in advance

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [September 20, 2022, 10:00pm UTC](https://discourse.vtk.org/t/inconsistency-with-returned-scalartype-in-vtkpointdata-from-vtk-9-0-3-onwards/9304/3 "2022-09-20T22:00:56Z")

</div>

I suspect the data is being type-promoted while setting up the threading process. I don’t remember, did you send some sample data? It would be helpful…
