convertingMyData - VolumeRC/AtlasConversionScripts GitHub Wiki

Converting other volume data type

The convertMyData.py script helps you to convert a set of images into an atlas. It does not search recursively for the file(s), so the input folder must contain the file(s) to be converted on the first level.

Required packages

The script requires the following python packages:

Prerequisites

To convert your file(s) some modifications are required in the script. The loadMyDatafunction must be redefined to support your own data type.

def loadMyData(filename):
	myImageSize = (32, 32)
	im = Image.new("L", myImageSize)
	putpix = im.im.putpixel
	for y in range(myImageSize[1]):
		for x in range(myImageSize[0]):
			val = 0 #... here get the value from your file (make sure that 0 <= val <= 255 )
			putpix((x,y), val)
	return im

Usage

The script takes two input arguments. The <InputFolder> with the file(s) to be converted and the <OutputFileName> where the atlas will be stored.

python convertMyData.py <InputFolder> <OutputFileName>