course 4 advanced image analysis & processing · 2018-04-12 · advanced image analysis &...

Post on 14-Aug-2020

3 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Course 4 –Advanced Image Analysis & Processing

April 2015

1

From Survey Results

• Heterogenous audience

• Day 1 : ImageJ -Macro : language, batch, use of ActionBar.

• Day2 : ImageJ - Plugins : install, writing, use of Eclipse.

• Day 3 : Matlab & CellProfiler, how to use them for image analysis, comparison to ImageJ

2

Fiji

3

FijiPlugins

4

http://fiji.sc/Fiji

Get Action Bar Plugin

5

Add Action Bar Plugin

6

Fiji.app\plugins

Paste :

Add Action Bar Plugin

7

Fiji.app\plugins

Paste :

My first Action Bar

8

My first Action Bar

9

Fiji.app\plugins\ActionBar

My first Action Bar

10

Refresh Menus

My first Action Bar

11

Fiji.app\plugins\ActionBar

My first Action Bar

12

Create

My first Action Bar

13

Paste

14

ChangeFile

Format

Colored texteasier to debug

15

Not Saved

Save Your Action Bar

16

My_Action_Bar.ijm

Action Barbasic functions

17

Action Barbasic functions

18

Action Barchange Icon

19

New icon file name

Action Barchange Icon

20

Action Barchange Label

21

label

Action Barchange Label

22

label

Action when clic on button

23

Clic

Actionto perform

//using macro functions

Macro Functions

24

Recorder Website

OR

Macro Functions

25

OR

Recorder Website

Record Functions

26

Record Functions

27

RGB

Macro language

Record Functions

28

Actionto perform

//using macro functions

// start of : line

29

of the button lineendstart

Use a macro : on an image

30

DAPI

H2B-RFPEdU-488

Create a nuclei mask from DAPI

Get for each nuclei :- the «Area» and - the «Intensitiy» of the Red and Green Channel

Create a macro to analyse Red and Green staining.

You have 30min!

How to write a macro

31

Template: tiny.cc\adip-1stStepMacro_blank

How to write a macro

32

Solution : tiny.cc\adip-1stStepMacro

Use a macro : on a folder

33

Use a macro : on a folder

Process>Batch>Macro

34

Use a macro on a folder

Process>Batch>Macro

35

Necessary to handle the processing of several images

Solution : tiny.cc\adip-2ndStepMacro

36

Use a macro on a folder

Process>Batch>Macro + GUI for parameters

37

Use a macro on a folder

Process>Batch>Macro + GUI for parameters

• How to ask user to set/select parameters

Starts with : Dialog.create(); Website

38

Use a macro on a folder

Process>Batch>Macro + GUI for parameters

Solution : tiny.cc\adip-3rdStepMacro

39

Use a macro on a folder

Process>Batch>Macro + GUI for parameters

40

Use a macro on a folder

Process>Batch>Macro + GUI for parameters

How to specify the parameters once and use them for all images ?

41

• Keep the same Macro• Modify it so it can process every file in a folder!

• You will need:– The path of the folder containing images.– The list of the files.

• You will have to :– Create a new folder to save images (mask)– Process every file.– Save the created mask of every image.

Use a macro on a folder

Macro: process image of a folder

42

• Keep the same Macro• Modify it so it can process every file in a folder!

• You will need:– The path of the folder containing images. getDirectory– The list of the files. getFileList

• You will have to :– Create a new folder to save images (mask) …– Process every file …– Save the created mask of every image …

Use a macro on a folder

Macro: process image of a folder

43

Use a macro on a folder

Macro: process image of a folder

44

What happens if : there is non-image File within the folder?

To prevent issue, we’ll use a functionto control that files are images.

Use a macro on a folder

Macro: process image of a folder

Solution : tiny.cc\adip-4thStepMacro

45

Use a macro in a Action Bar!

Macro: process image of a folder

//using macro functions

We can use our own <macro> code

46

Use a macro in a Action Bar!

on 1 image

adip-1stStepMacro.ijmWe can use our own <macro> code

Solution : tiny.cc\MyImproved_action_bar_step1.ijm

47

Use a macro in a Action Bar!

on 1 folder

adip-4thStepMacro.ijmWe can use our own <macro> code

Solution : tiny.cc\MyImproved_action_bar_step2.ijm

48

Use a macro in a Action Bar!

on 1 folder

adip-4thStepMacro.ijmWe can use our own <macro> code

This function can be necessaryfor other buttons of the Action Bar

49

Use a macro in a Action Bar!

codelibrary

contains functions that every <button> can access<codeLibrary>

Which other functions can we add to the <codeLibrary> ?

Solution : tiny.cc\MyImproved_action_bar_step3.ijm

50

Use a macro in a Action Bar!

codelibrary

the common part when processing1 image and 1 folder

51

Use a macro in a Action Bar!

codelibrary

52

Solution : tiny.cc\MyImproved_action_bar_step4.ijm

Use a macro in a Action Bar!

codelibrary

• We need to:– Store data (text, numbers…)– Retrieve these data

53

Use a macro in a Action Bar!

Parameters Windows : function

Use a macro in a Action Bar!

Parameters Windows : function

54

Container will be an ImageJ text window

55

Use a macro in a Action Bar!

Parameters Windows : function

56

Use a macro in a Action Bar!

Parameters Windows : function

57

Set them first !

Retrieve data

Use a macro in a Action Bar!

Parameters Windows : modify action bar

Solution : tiny.cc\MyImproved_action_bar_step5-0.ijm

58

Use a macro in a Action Bar!

Parameters Windows : setData

Solution : tiny.cc\MyImproved_action_bar_step5-1.ijm

Set Parameters <button>

59

Use a macro in a Action Bar!

Parameters Windows : setData

Solution : tiny.cc\MyImproved_action_bar_step5.ijm

Use it for the Folder <button>

That’s all Folks!

Tomorrow : JaaavvaaaAAAArrrgggghhh

60

top related