Exemple #1
0
SyncCtrlObj::SyncCtrlObj(Camera& cam,
			 DetInfoCtrlObj &det_info,
			 RoiCtrlObj &roi) :
  m_cam(cam),
  m_det_info(det_info),
  m_roi(roi),
  m_latency(det_info.getMinLatTime())
{
}
Exemple #2
0
RoiCtrlObj::RoiCtrlObj(Camera& cam,DetInfoCtrlObj& det) :
  m_cam(cam),
  m_det(det),
  m_has_hardware_roi(det.isPilatus3())
{
  DEB_CONSTRUCTOR();
  Size detImageSize;
  det.getDetectorImageSize(detImageSize);

  int fullframe_max_frequency = -1;

  if(m_has_hardware_roi)
    {
      if(detImageSize == Size(2463,2527)) // Pilatus 6M
	{
	  fullframe_max_frequency = 100;

	  Roi c2(2 * MODULE_WIDTH + 2 * MODULE_WIDTH_SPACE,
		 5 * MODULE_HEIGHT + 5 * MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 2 * MODULE_HEIGHT + MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("C2",500),c2));

	  Roi c18(MODULE_WIDTH + MODULE_WIDTH_SPACE,
		  3 * (MODULE_HEIGHT + MODULE_HEIGHT_SPACE),
		  3 * MODULE_WIDTH + 2 * MODULE_WIDTH_SPACE,
		  6 * MODULE_HEIGHT + 5 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("C18",200),c18));
	}
      else if(detImageSize == Size(1475,1679)) // Pilatus 2M
	{
	  fullframe_max_frequency = 250;

	  Roi c2(MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 3 * MODULE_HEIGHT + 3 * MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 2 * MODULE_HEIGHT + MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("C2",500),c2));

	  Roi r8(MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 2 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE,
		 2 * MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 4 * MODULE_HEIGHT + 3 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("R8",500),r8));

	  Roi l8(0,
		 2 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE,
		 2 * MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 4 * MODULE_HEIGHT + 3 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("L8",500),l8));

	  Roi c12(0,
		  2 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE,
		  3 * MODULE_WIDTH + 2 * MODULE_WIDTH_SPACE,
		  4 * MODULE_HEIGHT + 3 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("C12",250),c12));
	}
      else if(detImageSize == Size(981,1043)) // Pilatus 1M
	{
	  fullframe_max_frequency = 500;
	  
	  Roi r1(MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 2 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 MODULE_HEIGHT);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("R1",500),r1));

	  Roi l1(0,
		 2 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 MODULE_HEIGHT);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("L1",500),l1));

	  Roi r3(MODULE_WIDTH + MODULE_WIDTH_SPACE,
		 MODULE_HEIGHT + MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 3 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("R3",500),r3));

	  Roi l3(0,
		 MODULE_HEIGHT + MODULE_HEIGHT_SPACE,
		 MODULE_WIDTH,
		 3 * MODULE_HEIGHT + 2 * MODULE_HEIGHT_SPACE);
	  m_possible_rois.push_back(PATTERN2ROI(Pattern("L3",500),l3));
	}
      else
	m_has_hardware_roi = false;
    }

  if(!m_has_hardware_roi)
    DEB_WARNING() << "Hardware Roi not managed for this detector";
  
  Roi full(Point(0,0),detImageSize);
  m_possible_rois.push_back(PATTERN2ROI(Pattern("0",fullframe_max_frequency),full));
  m_current_roi = full;
  m_current_max_frequency = fullframe_max_frequency;
}
SyncCtrlObj::SyncCtrlObj(Camera& cam,DetInfoCtrlObj &det_info)
    :  m_cam(cam),m_latency(det_info.getMinLatTime())

{
}