title: ImageJ get value from an array
body: <p>I am trying to match image files to a specific row in an array. 
  In a first step I am selecting a folder that contain the tif files.
  Then I am selecting a csv file with the information I would like to use.
  I am opening each image one after the other. For an opened image I would like to retrieve the values from the line that correspond to the image name in the csv file. The header of the CSV file is FileName, XValue, YValue.</p>
  
  <p>Here's my code so far... Any help would be appreciated.</p>
  
  <pre class="lang-bs prettyprint-override"><code>// Make a pop up to select the input directory
  InputDirPath=getDirectory("Select Input directory");
  
  // Get the list of files in the input input directory selected above as an array
  InputFileList=getFileList(InputDirPath);
  
   // Defines cell separator and line separator
  CellSeparator=",";
  LineSeparator="\n";
  
  // open the csv file as a string
  FileCCValuesPath=File.openDialog("Select the file containing the coordinates");
  FileCCValuesString=File.openAsString(FileCCValuesPath);
  
  // Split each row into an array
  FileCCValuesRows=split(FileCCValuesString, LineSeparator);
  
  // Create new arrays for the content of column and for each row
  FileNameArray=newArray(FileCCValuesRows.length);
  XValueArray=newArray(FileCCValuesRows.length);
  YValueArray =newArray(FileCCValuesRows.length);
  
  
  // Start of the loop going through the list of image files in the input folder selected above
  for (Filei = 0; Filei &lt; InputFileList.length; Filei++)
  {
  InputFileNamei=InputFileList[Filei];
  InputFilePathi = InputDirPath+InputFileNamei;
  if(endsWith(InputFilePathi, ".tif"))
  {
  open(InputFilePathi);
  
  //////////This is where I am stuck
  //////////Get the XValue and Value from the CSV file for the row in which
  //////////FileName=InputFileNamei
  
  run("Translate...", "x=XValue y=YValue interpolation=None");
  }//end if
  }//end for File i loop
  
  // Notice of end of process
  waitForUser("Process is done");
  </code></pre>