2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Fiji (ImageJ)のマクロでチャンネルの色を変換する

Last updated at Posted at 2015-09-03

蛍光顕微鏡の画像解析にFiji(ImageJ)をよく用いるのだが、チャンネルの色をモノクロにしたり、赤や緑にするのを、ちまちまやるのが面倒だったので、チャンネルの色を一発で変換させる関数作ったら、大変便利だったのでメモ。

以下のマクロをコピペしてもらえれば、使えるはず。最近は四重染色をすることが多いので、チャンネル数が4つの画像を想定してあるが、三重染色の画像なら、4の入った箇所を削れば使えるでしょう。

setChannelColors.ijm
function setChannelColors (col1, col2, col3, col4){
		Stack.setChannel(1);
		run(col1);
		Stack.setChannel(2);
		run(col2);
		Stack.setChannel(3);
		run(col3);
		Stack.setChannel(4);
		run(col4);
	}

使い方というほどでもないが、col1/2/3/4が、それぞれチャンネル1~4の色に対応しているので、そこに"Blue", "Red", "Green", "Magenta", "Grays"なんかを指定してあげれば、よいです。

使用例

sample.ijm
setChannelColors("Blue", "Green", "Red", "Magenta");
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?