Skip to content

Commit

Permalink
Rename UclaMiniscopeV4CameraFrame
Browse files Browse the repository at this point in the history
- UclaMiniscopeV4CameraFrame ->
  UclaMiniscopeV4CameraDataFrame
- fix references xml comments after changing name
  • Loading branch information
cjsha committed Dec 6, 2024
1 parent 74f6f22 commit 2caba31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
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

0 comments on commit 2caba31

Please sign in to comment.