Giter VIP home page Giter VIP logo

android-app's Introduction

Build Status

All work in this repository is under the licence bsd available here Please see README-OPENCV.md for additional information on this branch.

Echopen Android App

This android app aims to show medical image from an echopen (or other ?) ultrasound device. See more about this project on echopen's wiki

Licence

Documentation

Installation (for Developers)

As an android app, you need to have a java JDK installed. We use Gradle as builder tools. You need to install it too. Before being able to build the app, you need to specify, in a local.properties file, in the root folder, the Android SDK and NDK location, with sdk.dir and ndk.dir, example:

sdk.dir=/Path/To/Your/.../Android/sdk
ndk.dir=/Path/To/Your/.../android-ndk-r10e

After, you can launch the Gradle wrapper from the project directory, example:

Mac/Linux

./gradlew assembleDebug

Windows

gradlew.bat assembleDebug

To install on a device:

  • Switch the Android device to dev mode (generally, tap 7 times on "Version number" in parameters)
  • Enable USB debugging
  • Connect the device to your computer (with screen unlocked to see the prompt)
  • Accept the prompt on your device, to authorize your computer
  • Launch gradlew with installDebug

Note: It seems that we use android-sdk 19 but current android-sdk version is 24 now...

How to contribute

Report a bug, ask for features, for all of this, we use Github issues

You can clone the projet, add something or fix a bug and make a pull request. We try to read them quick as possible.

Authors

Contact

Challenges and To Dos

Mockups

To drive your code, here's the MOCKUP that we have set with medical doctors, engineers and designers.

alt tag alt tag alt tag

Testing Data

A lots of tools enable you to test and play with the data :

Getting real data

The app let you get data via TCP or UDP protocol. By default, the system works with TCP protocol. To test UDP data you can switch to redpitaya_udp_data branch. @todo : create a developer mode, first screen app will then let you change the protocol and set up the rights hardware constants (number of lines, number of samples...). Constants are set in the Constants class in the utils package. The critical ones are : PreProcParam.NUM_LINES and PreProcParam.NUM_SAMPLES, that corresponds to the number of lines and the number of samples the hardware is acquiring.

If you want to simulate TCP data transfer, you can put in the doInBackground method of the ProcessTCPTask some lines as :

`while(true){ int num_lines = Constants.PreProcParam.NUM_LINES; int num_samples = Constants.PreProcParam.NUM_SAMPLES; byte[] message = new byte[num_lines * num_samples];

		  for (int i = 0; i < num_lines; i++) {
              for (int j = 0; j < num_samples; j++) {
                      message[i*rows +j] = (byte) /* the pixel data you want from à to 255 */;
              }
          }
          ScanConversion scnConv = ScanConversion.getInstance(message);
          scnConv0.setTcpData();
          refreshUI(scnConv);
      }` 
don't forget to comment the piece of code dealing with sockets ! 	  

Simulating real data

You'll find in the kit-soft repo, you'll find some real data file raw_data.txt that was output by our hardware suite.

In this repo, you'll find all the tools to install in local a UDP server that can simulate a real time data coming from our hardware.

Simulating fake but medical data

You'll find in phantom/img_kydney.txt and phantom/img_obs.txt the data that is output from the Hardware. The goal is to build and obtain from each of these double arrays the images stored respectively as phantom/img_kydney.bmp and phantom/img_obs.bmp.

The image img_kydney.bmp is more realistic than img_obs.bmp.

alt tag alt tag

Simulating with a plain JAVA app

In the phantom/test_data directory, you'll find a plain JAVA app that lets you test and taste the data without the hassle of bothering with Android configuration and other heaviness.

phantom/img_kydney.txt and phantom/img_obs.txt corresponds to the raw signal that needs to be filtered. They serve as basis for the envelope detection from which pixels intensity are deduced. ** The resulting pixel file sits in data_kydney.csv**

In the phantom folder, there are some java classes that are meant to ran outside of android. This is useful for testing and improving the , without the hassle of running an android emulator.
remark the PostProcessing class relies on BoofCV library. The jars can be found here.

Image Processing this is exploratory

EchOpen will rely on BoofCV library as main image processing tool. It is pure JAVA libraries, contrary to the well-known OpenCV, which is c/c++ library.

As specified in the BoofCV doc, one have to turn the images - say for instance bitmap image - in ImageUInt8 or ImageFloat32 class in order to use simply BoofCV

File image = new File($ultrasound_file);
Bitmap bitmap = BitmapFactory.decodeFile(image.getAbsolutePath());
ImageUInt8 boofcv_image = ConvertBitmap.bitmapToGray(bitmap, (ImageUInt8) null, null);

for those interested, here's a link to find OpenCV vs. BoofCV performance benchmark. As said there, OpenCV seems better on low level operations but BoofCV seems better on most of high level operations.

The client does not worry about BootCV Images class, they are instanciated from BaseImage. Then client throws to image processor class an ImageView and gets backs a BitMap class. Any filter must inherit from BaseProcess. For instance, the app implements this kind of code corresponding to a wavelette denoising treatment.

WaveletDenoise waveletDenoise = new WaveletDenoise(image);
waveletDenoise.denoise();
bitmap = waveletDenoise.getBitmap();

Processing can take a long time. It is recommended to wrap it in an AsyncTask !

Documentation and Issues

Documentation and issue about echopen -- Perhaps some duplication with http://echopen.org/

See issues

android-app's People

Contributors

benchoufi avatar cotsog avatar francoisdupayrat avatar loic-fejoz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.