class_docstr: The PlateViewer class lets the user view the files associated with plates
  
  The idea here is that the PlateViewer is given a list of image files
  with plate, well and site metadata. The plate viewer organizes the
  files and lets the user browse individual plates.
class_docstr_tok: ["The","PlateViewer","class","lets","the","user","view","the","files","associated","with","plates","The","idea","here","is","that","the","PlateViewer","is","given","a","list","of","image","files","with","plate",",","well","and","site","metadata",".","The","plate","viewer","organizes","the","files","and","lets","the","user","browse","individual","plates","."]
docstr: Set the display well and redraw the figure
code: def set_display_well(self, well):
      """Set the display well and redraw the figure"""
      with self.image_dict_lock:
          self.image_dict = {}
          self.image_dict_generation += 1
  
      def fn():
          from scipy.io.matlab.mio import loadmat
          from cellprofiler_core.utilities.pathname import url2pathname
  
          with self.image_dict_lock:
              generation = self.image_dict_generation
  
          for k, v in list(well.items()):
              sd = {}
              with self.image_dict_lock:
                  if self.image_dict_generation > generation:
                      return
                  self.image_dict[k] = sd
              for c, fd in enumerate(v):
                  if PlateData.D_CHANNEL in fd:
                      channel = fd[PlateData.D_CHANNEL]
                  else:
                      channel = str(c + 1)
                  url = fd[PlateData.D_FILENAME]
                  try:
                      if url.lower().endswith(".mat"):
                          img = loadmat(
                              url2pathname(url), struct_as_record=True
                          )["Image"]
                      else:
                          from cellprofiler_core.reader import (
                              get_image_reader,
                          )
                          from cellprofiler_core.pipeline import (
                              ImageFile,
                          )
  
                          reader = get_image_reader(ImageFile(url))
                          img = reader.read()
                      with self.image_dict_lock:
                          if self.image_dict_generation > generation:
                              return
                          sd[channel] = img
                  except:
                      traceback.print_exc()
                      pass
          wx.CallAfter(self.update_figure)
          # not sure if necessary - NG
          System = scyjava.jimport("java.lang.System")
          System.gc()
  
      t = threading.Thread(target=fn)
      t.setDaemon(True)
      t.start()
  
imports: import multiprocessing
  import threading
  import traceback
  import matplotlib
  import matplotlib.backends.backend_wx
  import matplotlib.backends.backend_wxagg
  import matplotlib.cm
  import matplotlib.figure
  import numpy
  import wx
  import wx.grid
  import scyjava
label_desc: Use image node_id 20 for calling the PlateViewer obj's underlying member method code with example usage: obj.set_display_well(well) without return types