# Use of Update() in vtk7

**URL:** https://discourse.vtk.org/t/use-of-update-in-vtk7/7491
**Category:** Support
**Created:** [December 24, 2021, 5:37am UTC](https://discourse.vtk.org/t/use-of-update-in-vtk7/7491 "2021-12-24T05:37:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![IT-five](https://discourse.vtk.org/user_avatar/discourse.vtk.org/it-five/32/4448_2.png) [@IT-five](https://discourse.vtk.org/u/IT-five)
#### Post date: [December 24, 2021, 5:37am UTC](https://discourse.vtk.org/t/use-of-update-in-vtk7/7491/1 "2021-12-24T05:37:08Z")

</div>

# read file for geometry

```
  reader = vtk.vtkXMLMultiBlockDataReader()
  reader.SetFileName(geometry_file)
  reader.Update()
  data = reader.GetOutput()
  data_iterator = data.NewIterator()
  img_data = data_iterator.GetCurrentDataObject() 
  img_data.Update()
  point_data = img_data.GetPointData()
  array_data = point_data.GetArray(0)
  np_array = vtk_to_numpy(array_data)
  img_shape = img_data.GetWholeExtent()
  np_shape = [img_shape[3] - img_shape[2] + 1, img_shape[1] - img_shape[0] + 1, 1]
  geometry_array = np_array.reshape(np_shape)
  if np.isnan(geometry_array).any():
    continue

```

ERROR:‘vtkmodules.vtkCommonDataModel.vtkImageData’ object has no attribute ‘Update’  
Can you please tell me how to modify it?

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.vtk.org/user_avatar/discourse.vtk.org/danlipsa/32/390_2.png) [@danlipsa](https://discourse.vtk.org/u/danlipsa)
#### Post date: [December 24, 2021, 1:32pm UTC](https://discourse.vtk.org/t/use-of-update-in-vtk7/7491/2 "2021-12-24T13:32:43Z")

</div>

You update a filter not the data. Just remove the Update() on the image data.
