[Insight-users] converting vff to .raw

Kevin H. Hobbs hobbsk at ohiou.edu
Fri Oct 27 14:23:41 EDT 2006


On Thu, 2006-10-26 at 19:09 +0000, Jill Lin wrote:
> Can anyone provide sample codes or functions on how to convert .vff images 
> to .raw files? Thanx.

The .vff files I've seen are raw files with a header. I have one here
its header looks like this

ncaa
rank=3;
type=raster;
size=1265 910 875;
origin=209 171 1;
y_bin=1;
z_bin=1;
bands=1;
bits=16;
format=slice;
title=;
subject=;
date=20060412;
center_of_rotation=850.496216;
central_slice=365.046997;
rfan_y=5581.484863;
rfan_z=5581.484863;
angle_increment=0.500000;
reverse_order=no;
min=-14.796139;
max=53.969429;
spacing=1.00 1.00 1.00;
elementsize=0.046090;
cmdLine="/usr/bin/mpievsbeam.bin -U http://localhost:8000 -P 127 -i /data/eXplore_Data/Hobbs-Lobster_Stomach/001/Corrected/uwarp%04d.vff -f 0 -o /data/eXplore_Data/Hobbs-Lobster_Stomach/001/Volumes/Hobbs-Lobster_Stomach_-_Lobster_tummy.vff -q -R -v -a 850.496215820313 -s 365.046997 -r 5581.48501629794 -t 0.5 -n -45 -x 209 -y 171 -z 1 -c 1265 -d 910 -e 875 -E 0.04609 -W -1 -A -1 -B -1 -g /data/eXplore_Data/Hobbs-Lobster_Stomach/001/Offset.dat";

The VTK reader seemed to read it fine I just copied the values out of
the header.

	// Reader
	vtkImageReader2 * reader = vtkImageReader2::New();
	reader->SetFileName
	("CT-Apr_13_2006/stomach.vff" );
	reader->SetDataScalarTypeToShort();
	reader->SetFileDimensionality( 3 );
	reader->SetDataExtent( 0, 1264, 0, 909, 0, 874 );
	reader->SetDataSpacing( 0.046090, 0.046090, 0.046090 );
	reader->FileLowerLeftOn();
	reader->SetDataByteOrderToBigEndian();

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://public.kitware.com/pipermail/insight-users/attachments/20061027/bdcc203d/attachment.pgp


More information about the Insight-users mailing list