public void openImage(String path, boolean tryLoadData){
		// This may be a data file rather than an image.
		dataPath = "";
		boolean loadData = tryLoadData;
		for (Parser p : filters.values()){
			if (path.endsWith(p.getSuffix())){
				dataPath = path;
				loadData = true;
				
				
				// Get image path from data file
				try (BufferedReader br = new BufferedReader(new FileReader(path))){
					StringBuffer sb = new StringBuffer();
					String read;
					sb.append((read = br.readLine()) + "\n");
					while ((read = br.readLine()) != null) sb.append(read + "\n");
					
					imgPath = p.getImagePath(sb.toString());
					System.out.println("Read imgPath"+imgPath);
					File f = new File(imgPath);
					if (!f.isAbsolute()){
						imgPath = (new File(dataPath)).getParent()+File.separator+imgPath;						
					}
					currParser = p;
				}
				catch (IOException e)
				{
					System.out.println("Could not read.");
				}
				break;
			}
		}
		if (loadData && dataPath.length() == 0){
			dataPath = path + DEFAULT_SUFFIX;
			currParser = new DefaultParser();
			//imagePanel.setSheetPath(path);
			imgPath = path;
		}
		
		
		imagePanel.setSheetPath(imgPath);
		Tools.setButtonEnabledState(ImageType.SHEET);
		if (loadData){
			load(dataPath);
		}
		setIsDirty(false);
	}