예제 #1
0
Bool RFullPanelDial::TwoDOptionsInit()
{	LoadCol();
	LaunchDial(new TwoDPref,0);
	CRListBox* prlistbox;
	prlistbox=GETDLGITEM(IDC_RLISTBOX);
	prlistbox->SetHilightCol(4);
	prlistbox->SetHilightRow(0);
	prlistbox->ReplaceString("",0,5);
	prlistbox->SetColumnWidth(5,col5   );
	prlistbox->SetColumnWidth(6,collast);
	return TRUE;
}
예제 #2
0
Bool RFullPanelDial::ViewerOptionsInit()
{	LoadCol();
	LaunchDial(new CSViewer,0);
	CRListBox* prlistbox;
	prlistbox=GETDLGITEM(IDC_RLISTBOX);
	prlistbox->SetHilightCol(3);
	prlistbox->ReplaceString("",0,4);
	prlistbox->SetColumnWidth(4,col4   );
	prlistbox->SetColumnWidth(5,collast);
	prlistbox->SetHilightRow(0);
	return TRUE;
}
/* 
 * Compute 2D DFT on double data:
 * forward if direction==FFT_FORWARD,
 * inverse if direction==FFT_INVERSE.
 */
int fft2d(DCOMPLEX *array, int rows, int cols, int direction)
{
  int i, maxsize, errflag;
  
  if(!power_of_2(rows) || !power_of_2(cols)) {
    handle_error("fft: input array must have dimensions a power of 2");
    return(ERROR);
  }
  
  /* Allocate 1D buffer */
  bigBuffd = array;
  maxsize = rows>cols ? rows : cols;
  errflag = allocateBuffer(maxsize);
  if(errflag != NO_ERROR) return(errflag);

  /* Compute transform row by row */
  if(cols>1)
    for(i=0;i<rows;i++) 
      {
      	LoadRow(bigBuffd,i,cols);
      	FFT842(direction,cols,stageBuff);
      	StoreRow(bigBuffd,i,cols);
      }
  
  /* Compute transform column by column */
  if(rows>1)
    for(i=0;i<cols;i++) 
      {
        LoadCol(bigBuffd,i,rows,cols);
        FFT842(direction,rows,stageBuff);
        StoreCol(bigBuffd,i,rows,cols);
      }

  freeBuffer();
  return(NO_ERROR);
}