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:29:23 +0000
Hi Andrew,

I think you are pretty much doing everything OK.

When you say:



________________________________________
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


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

Navigate by Date:
Prev: Writing areadetector driver- Getting array data to NDArray properly? Gomella, Andrew (NIH/NHLBI) [F]
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: Writing areadetector driver- Getting array data to NDArray properly? Gomella, Andrew (NIH/NHLBI) [F]
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 ·