EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Writing areadetector driver- Getting array data to NDArray properly?
From: Mark Rivers <[email protected]>
To: "Gomella, Andrew (NIH/NHLBI) [F]" <[email protected]>, "[email protected]" <[email protected]>
Date: Mon, 9 Jun 2014 01:34:22 +0000
Hi Andrew,

Sorry, I sent the previous message accidentally.

I think you are pretty much doing everything OK.

When you say:

> Testing this, Tiff plugin gives me an error about not being able to open it 

What do you mean by this?  Is the error from the Tiff plugin itself, or from some other application unable to open the TIFF file?  If the error is from the Tiff plugin please send the exact error message.

> and the Imagej Plugin just shows a black window with a  "UpdateImage got exception: pendIO timed out" error. 

That is almost certainly a problem with EPICS_CA_MAX_ARRAY_BYTES.  Are you sure it is set to 30MB on both the IOC process and the ImageJ process?  What version of the ImageJ plugin are you running?

Please type the IOC command:

epicsPrtEnvParams

and check the value.

Mark


________________________________________
From: [email protected] [[email protected]] on behalf of Gomella, Andrew (NIH/NHLBI) [F] [[email protected]]
Sent: Sunday, June 08, 2014 7:12 PM
To: [email protected]
Subject: Writing areadetector driver- Getting array data to NDArray properly?

Hi Everyone,

I am writing a driver for a Varian 3024m flat panel detector. I am having trouble in my driver getting the data from the panel into NDArrays.

To get the data from the panel it is fairly simple, I pass a pointer to the dll (with the call vip_get_image) and it populates it with  ushorts. It looks like this:


USHORT *pFrame = new USHORT[this->sensorSize];
vip_get_image(this->ModeNumber, VIP_CURRENT_IMG_RAW, this->sensorWidth, this->sensorHeight, pFrame);

Next I attempt to get this data to NDPluginStdArrays with:
(This is just one of many attempts, I tried my best to follow examples from other areadetector drivers, mainly Prosilica and PerkinElmer).


NDArray *pImage;
dims[0] = this->sensorWidth;
dims[1] = this->sensorHeight;

if (this->pArrays[0])
       this->pArrays[0]->release();

this->pArrays[0] = this->pNDArrayPool->alloc(2, dims, NDUInt16, 0, NULL);
pImage = this->pArrays[0];
pImage->getInfo(&arrayInfo);
memcpy(pImage->pData, pFrame, arrayInfo.totalBytes);


pImage->getInfo(&arrayInfo);
setIntegerParam(NDArraySize,  arrayInfo.totalBytes);
setIntegerParam(NDArraySizeX, arrayInfo.xSize);
setIntegerParam(NDArraySizeY, arrayInfo.ySize);
setIntegerParam(NDDataType, dataType);
setIntegerParam(NDColorMode, colorMode);

getIntegerParam(NDArrayCallbacks, &arrayCallbacks);

if (arrayCallbacks) {

    this->unlock();
    doCallbacksGenericPointer(pImage, NDArrayData, 0);
    this->lock();
}


Testing this, Tiff plugin gives me an error about not being able to open it and the Imagej Plugin just shows a black window with a  "UpdateImage got exception: pendIO timed out" error. My EPICS_MAX_CA_ARRAY_BYTES is set to 30MB, and all appropriate array callback/ image callbacks are enabled for this test. System is Windows x64, i7 processor, 16gb ram. Area detector 1-9-1.

My other attempts, which there are too numerous to mention here result in the app crashing.

Any help is greatly appreciated.

Thanks,
Andrew Gomella

Imaging Physics Lab, NIH


References:
Writing areadetector driver- Getting array data to NDArray properly? Gomella, Andrew (NIH/NHLBI) [F]
RE: Writing areadetector driver- Getting array data to NDArray properly? Mark Rivers

Navigate by Date:
Prev: RE: Writing areadetector driver- Getting array data to NDArray properly? Mark Rivers
Next: RE: Writing areadetector driver- Getting array data to NDArray properly? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Writing areadetector driver- Getting array data to NDArray properly? Mark Rivers
Next: RE: Writing areadetector driver- Getting array data to NDArray properly? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·