#
#	This is Sub Makefile for Create Mask Image that has same shape as Input.
#

#### Input extention ####
# Defined at Main

#### Suffixes rule ####
.SUFFIXES: .$(IN_MASK) .$(MASK) .$(MASK)tmp

#### INCLUDE ####

#### Definition ####
# Defined at Main


#### Rules of the list created ####


##### Commands #####
MaskImage::
	make $(MASK_FILE_NAME).$(MASK);

help_MaskImage::
	@echo
	@echo "MaskImage"
	@echo "This is Sub Makefile for Create Mask Image that has same shape as Input."
	@echo
	@echo "	(Command):"
	@echo "		MaskImage:		Create Mask Image that has same shape as Input."
	@echo
	@echo "	(Setting Data):"
	@echo "		MASK_FILE_NAME:		filename of input and output"
	@echo "		IN_MASK:		extention of input"
	@echo "		MASK:			extention of output"
	@echo "		MASK_VALUE:		half value point of low pass filter for output"
	@echo "		MASK_F_MODE:		low pass filter mode"

##### Commands(Input to Output) #####
ifdef IN_MASK
ifdef MASK
.$(IN_MASK).$(MASK)tmp:
	mrcImageLowPassFilter -i $*.$(IN_MASK) -o $*.$(MASK)tmp -m $(MASK_F_MODE) -hvp $(MASK_VALUE);
endif #MASK
endif #IN_MASK

ifdef MASK
.$(MASK)tmp.$(MASK):
	mrcImageBinalization -i $*.$(MASK)tmp -o $*.$(MASK) -m 32;
endif #MASK
