diff --git a/Modules/IO/MeshBase/include/itkMeshIOBase.h b/Modules/IO/MeshBase/include/itkMeshIOBase.h index 50e10c49c7b..159b1cedb51 100644 --- a/Modules/IO/MeshBase/include/itkMeshIOBase.h +++ b/Modules/IO/MeshBase/include/itkMeshIOBase.h @@ -802,9 +802,12 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject auto numberOfPoints = static_cast(input[inputIndex++]); if (numberOfPoints > 2 && cellType == CellGeometryEnum::LINE_CELL) { - cellType = CellGeometryEnum::POLYLINE_CELL; + output[outputIndex++] = static_cast(CellGeometryEnum::POLYLINE_CELL); + } + else + { + output[outputIndex++] = static_cast(cellType); } - output[outputIndex++] = static_cast(cellType); output[outputIndex++] = static_cast(numberOfPoints); for (unsigned int jj = 0; jj < numberOfPoints; ++jj)