Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added library for Amplio in 6.0

  • Loading branch information...
commit d234c8b5a18735fc409fd1d4350d2884821ecbe2 1 parent 9ecb725
Will Eddins authored
6 Ultrasonix SDK.sln
View
@@ -5,6 +5,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ultrasonix.Texo", "Ultrason
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ultrasonix.Porta", "Ultrasonix.Porta\Ultrasonix.Porta.vcxproj", "{5C7B60F0-33B0-471D-A4E5-D475E439C062}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Ultrasonix.Amplio", "Ultrasonix.Amplio\Ultrasonix.Amplio.vcxproj", "{A86926C6-AC9E-45EE-B23C-6482062F5BA8}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -19,6 +21,10 @@ Global
{5C7B60F0-33B0-471D-A4E5-D475E439C062}.Debug|Win32.Build.0 = Debug|Win32
{5C7B60F0-33B0-471D-A4E5-D475E439C062}.Release|Win32.ActiveCfg = Release|Win32
{5C7B60F0-33B0-471D-A4E5-D475E439C062}.Release|Win32.Build.0 = Release|Win32
+ {A86926C6-AC9E-45EE-B23C-6482062F5BA8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A86926C6-AC9E-45EE-B23C-6482062F5BA8}.Debug|Win32.Build.0 = Debug|Win32
+ {A86926C6-AC9E-45EE-B23C-6482062F5BA8}.Release|Win32.ActiveCfg = Release|Win32
+ {A86926C6-AC9E-45EE-B23C-6482062F5BA8}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
40 Ultrasonix.Amplio/AssemblyInfo.cpp
View
@@ -0,0 +1,40 @@
+#include "stdafx.h"
+
+using namespace System;
+using namespace System::Reflection;
+using namespace System::Runtime::CompilerServices;
+using namespace System::Runtime::InteropServices;
+using namespace System::Security::Permissions;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly:AssemblyTitleAttribute("Ultrasonix.Amplio")];
+[assembly:AssemblyDescriptionAttribute("")];
+[assembly:AssemblyConfigurationAttribute("")];
+[assembly:AssemblyCompanyAttribute("Microsoft")];
+[assembly:AssemblyProductAttribute("Ultrasonix.Amplio")];
+[assembly:AssemblyCopyrightAttribute("Copyright (c) Microsoft 2012")];
+[assembly:AssemblyTrademarkAttribute("")];
+[assembly:AssemblyCultureAttribute("")];
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the value or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly:AssemblyVersionAttribute("1.0.*")];
+
+[assembly:ComVisible(false)];
+
+[assembly:CLSCompliantAttribute(true)];
+
+[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
5 Ultrasonix.Amplio/Stdafx.cpp
View
@@ -0,0 +1,5 @@
+// stdafx.cpp : source file that includes just the standard includes
+// Ultrasonix.Amplio.pch will be the pre-compiled header
+// stdafx.obj will contain the pre-compiled type information
+
+#include "stdafx.h"
7 Ultrasonix.Amplio/Stdafx.h
View
@@ -0,0 +1,7 @@
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#include "amplio.h"
6 Ultrasonix.Amplio/Ultrasonix.Amplio.cpp
View
@@ -0,0 +1,6 @@
+// This is the main DLL file.
+
+#include "stdafx.h"
+
+#include "Ultrasonix.Amplio.h"
+
87 Ultrasonix.Amplio/Ultrasonix.Amplio.h
View
@@ -0,0 +1,87 @@
+// Ultrasonix.Amplio.h
+
+#pragma once
+
+#include "Stdafx.h"
+
+using namespace System;
+
+namespace Ultrasonix
+{
+ namespace Amplio
+ {
+ public ref class Amplio
+ {
+ public: int InitRfToB(int freqA, int freqB, int freqcutoff, int freqSampling, int length, int useCompression, int dyn, int reject)
+ {
+ return amplioInitRfToB(freqA, freqB, freqcutoff, freqSampling, length, useCompression, dyn, reject);
+ }
+
+ public: array<Byte>^ ProcessRfToB(array<short>^ rfData, int decimation)
+ {
+ pin_ptr<short> rfPtr = &rfData[0];
+ short* rf = rfPtr;
+
+ int size = (int)(rfData->Length / Math::Pow(2, decimation));
+
+ array<Byte>^ arr = gcnew array<Byte>(size);
+ pin_ptr<Byte> p = &arr[0];
+ unsigned char* data = p;
+
+ int result = amplioProcessRfToB(rf, decimation, data);
+
+ // Check result?
+
+ return arr;
+ }
+
+ public: int InitScanConversion(int pixel_width, int pixel_height, int num_samples, int num_scanlines, int start_sample, int end_sample,
+ int start_scanline, int end_scanline, int sampling_frequency, int line_density, int steer_angle, int extension_angle, int origin_x,
+ int origin_y, int microns_x, int microns_y, int elements, int pitch, int radius, int probe_angle,
+ int transmit_offset)
+ {
+ return amplioInitSC(pixel_width, pixel_height, num_samples, num_scanlines, start_sample, end_sample,
+ start_scanline, end_scanline, sampling_frequency, line_density, steer_angle, extension_angle, origin_x,
+ origin_y, microns_x, microns_y, elements, pitch, radius, probe_angle,
+ transmit_offset);
+ }
+
+ public: array<Byte>^ ScanConvert(array<Byte>^ input)
+ {
+ pin_ptr<Byte> inputPtr = &input[0];
+ const unsigned char* in = inputPtr;
+
+ int size = input->Length;
+
+ array<Byte>^ output = gcnew array<Byte>(size);
+ pin_ptr<Byte> outPtr = &output[0];
+ unsigned char* out = outPtr;
+
+ int result = amplioScanConvert(in, out);
+
+ return output;
+ }
+
+ public: array<Byte>^ Enhance(array<Byte>^ input, int width, int height, int edge, int smooth, int weight, int contrast, int lpcutoff)
+ {
+ pin_ptr<Byte> inputPtr = &input[0];
+ unsigned char* in = inputPtr;
+
+ int size = width * height;
+
+ array<Byte>^ output = gcnew array<Byte>(size);
+ pin_ptr<Byte> outPtr = &output[0];
+ unsigned char* out = outPtr;
+
+ int result = amplioEnhance(in, out, width, height, edge, smooth, weight, contrast, lpcutoff);
+
+ return output;
+ }
+
+ public: void Destroy()
+ {
+ amplioDestroy();
+ }
+ };
+ }
+}
97 Ultrasonix.Amplio/Ultrasonix.Amplio.vcxproj
View
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A86926C6-AC9E-45EE-B23C-6482062F5BA8}</ProjectGuid>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkProfile>Client</TargetFrameworkProfile>
+ <Keyword>ManagedCProj</Keyword>
+ <RootNamespace>UltrasonixAmplio</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CLRSupport>true</CLRSupport>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CLRSupport>true</CLRSupport>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)obj\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ <OutDir>$(ProjectDir)bin\$(Configuration)\</OutDir>
+ <IntDir>$(ProjectDir)obj\$(Configuration)\</IntDir>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>amplio.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalDependencies>amplio.lib</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="amplio.h" />
+ <ClInclude Include="Stdafx.h" />
+ <ClInclude Include="Ultrasonix.Amplio.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="AssemblyInfo.cpp" />
+ <ClCompile Include="Stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="Ultrasonix.Amplio.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
39 Ultrasonix.Amplio/Ultrasonix.Amplio.vcxproj.filters
View
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="Ultrasonix.Amplio.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="amplio.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="Ultrasonix.Amplio.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="AssemblyInfo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="Stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
31 Ultrasonix.Amplio/amplio.h
View
@@ -0,0 +1,31 @@
+#pragma once
+
+#ifdef EXPORT_AMPLIO
+ #define amplioL __declspec(dllexport)
+#elif defined IMPORTAMPLIO
+ #define amplioL __declspec(dllimport)
+#else
+ #define amplioL
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// rf to b conversion
+amplioL int amplioInitRfToB(int freqA, int freqB, int freqcutoff, int freqSampling, int length, int useCompression, int dyn, int reject);
+amplioL int amplioProcessRfToB(short* rfData, int decimation, unsigned char* envData);
+// scan conversion
+amplioL int amplioInitSC(int pixel_width, int pixel_height, int num_samples, int num_scanlines, int start_sample, int end_sample,
+ int start_scanline, int end_scanline, int sampling_frequency, int line_density, int steer_angle, int extension_angle, int origin_x,
+ int origin_y, int microns_x, int microns_y, int elements, int pitch, int radius, int probe_angle,
+ int transmit_offset);
+amplioL int amplioScanConvert(const unsigned char* input, unsigned char* output);
+// enhancement filtering
+amplioL int amplioEnhance(unsigned char* datain, unsigned char* dataout, int w, int h, int edge, int smooth, int weight, int contrast,
+ int lpcutoff);
+amplioL void amplioDestroy();
+
+#ifdef __cplusplus
+}
+#endif
BIN  Ultrasonix.Amplio/amplio.lib
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.