Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename UclaMiniscopeV4CameraFrame #380

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions OpenEphys.Onix1/UclaMiniscopeV4CameraData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
namespace OpenEphys.Onix1
{
/// <summary>
/// Produces a sequence of <see cref="UclaMiniscopeV4CameraFrame"/>s from the Python-480 image sensor on a
/// Produces a sequence of <see cref="UclaMiniscopeV4CameraDataFrame"/>s from the Python-480 image sensor on a
/// UCLA Miniscope V4.
/// </summary>
public class UclaMiniscopeV4CameraData : Source<UclaMiniscopeV4CameraFrame>
public class UclaMiniscopeV4CameraData : Source<UclaMiniscopeV4CameraDataFrame>
{
/// <inheritdoc cref = "SingleDeviceFactory.DeviceName"/>
[TypeConverter(typeof(UclaMiniscopeV4.NameConverter))]
Expand All @@ -38,11 +38,11 @@ public class UclaMiniscopeV4CameraData : Source<UclaMiniscopeV4CameraFrame>
public UclaMiniscopeV4ImageDepth DataType { get; set; } = UclaMiniscopeV4ImageDepth.U8;

/// <summary>
/// Generates a sequence of <see cref="UclaMiniscopeV4CameraFrame"/>s at a rate determined by <see
/// Generates a sequence of <see cref="UclaMiniscopeV4CameraDataFrame"/>s at a rate determined by <see
/// cref="ConfigureUclaMiniscopeV4Camera.FrameRate"/>.
/// </summary>
/// <returns>A sequence of <see cref="UclaMiniscopeV4CameraFrame"/>s</returns>
public unsafe override IObservable<UclaMiniscopeV4CameraFrame> Generate()
/// <returns>A sequence of <see cref="UclaMiniscopeV4CameraDataFrame"/>s</returns>
public unsafe override IObservable<UclaMiniscopeV4CameraDataFrame> Generate()
{
return DeviceManager.GetDevice(DeviceName).SelectMany(deviceInfo =>
{
Expand All @@ -51,7 +51,7 @@ public unsafe override IObservable<UclaMiniscopeV4CameraFrame> Generate()
var scopeData = device.Context.GetDeviceFrames(passthrough.Address);
var dataType = DataType;

return Observable.Create<UclaMiniscopeV4CameraFrame>(observer =>
return Observable.Create<UclaMiniscopeV4CameraDataFrame>(observer =>
{
var sampleIndex = 0;
var imageBuffer = new short[UclaMiniscopeV4.SensorRows * UclaMiniscopeV4.SensorColumns];
Expand Down Expand Up @@ -83,12 +83,12 @@ public unsafe override IObservable<UclaMiniscopeV4CameraFrame> Generate()
{
var eightBitImageData = new Mat(imageData.Size, Depth.U8, 1);
CV.ConvertScale(imageData, eightBitImageData, 0.25);
observer.OnNext(new UclaMiniscopeV4CameraFrame(clockBuffer, hubClockBuffer, eightBitImageData.GetImage()));
observer.OnNext(new UclaMiniscopeV4CameraDataFrame(clockBuffer, hubClockBuffer, eightBitImageData.GetImage()));
break;
}
case UclaMiniscopeV4ImageDepth.U10:
{
observer.OnNext(new UclaMiniscopeV4CameraFrame(clockBuffer, hubClockBuffer, imageData.GetImage()));
observer.OnNext(new UclaMiniscopeV4CameraDataFrame(clockBuffer, hubClockBuffer, imageData.GetImage()));
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ namespace OpenEphys.Onix1
/// <summary>
/// Image data produced by the Python-480 CMOS image sensor on a UCLA Miniscope V4.
/// </summary>
public class UclaMiniscopeV4CameraFrame : BufferedDataFrame
public class UclaMiniscopeV4CameraDataFrame : BufferedDataFrame
{
/// <summary>
/// Initializes a new instance of the <see cref="UclaMiniscopeV4CameraFrame"/> class.
/// Initializes a new instance of the <see cref="UclaMiniscopeV4CameraDataFrame"/> class.
/// </summary>
/// <param name="clock">An array of <see cref="DataFrame.Clock"/> values.</param>
/// <param name="hubClock">An array of hub clock counter values.</param>
/// <param name="image">A image produced by the Python-480 on a UCLA Miniscope V4.</param>
public UclaMiniscopeV4CameraFrame(ulong[] clock, ulong[] hubClock, IplImage image)
public UclaMiniscopeV4CameraDataFrame(ulong[] clock, ulong[] hubClock, IplImage image)
: base (clock, hubClock)
{
Image = image;
Expand Down
Loading