[Insight-users] VISUALIZE raw slices - brainweb -

Christos Panagiotou C.Panagiotou at cs.ucl.ac.uk
Sat, 21 Feb 2004 07:02:26 +0000


guys i sent this both to itk and vtk maillists as some help can be found in both 
sets of users, as time is running short for me - thanks for your time 

i ve go some raw slice data sets from the link shown below (source kitware, brainweb)

ftp://public.kitware.com/pub/itk/Data/BrainWeb

does anyone have any code which visualizes the 3D volume?

  const char *fname = "/home/christos/PhD/Data/raw/SHORT/t1_icbm_normal_1mm_pn0_rf0.raws"; 

  vtkImageReader2 *v16 = vtkImageReader2::New();
  v16->SetDataExtent(0,180,0,216,0,180 ); 
  v16->SetDataByteOrderToLittleEndian(); //does this describe the endianess of the file or the machine?
  v16->SetDataScalarTypeToShort(); //or UnsignedChar
    

  v16->SetFileName(fname);
  v16->SetFileDimensionality(3);
  v16->SetSwapBytes(2); //if i set the data byte order to a specific endianess do i have to set this too?
  v16->SetDataSpacing (1.0,1.0,1.0);
  v16->DebugOn();
  v16->Update();

I later on pass this to contour filter of maching cubes -> poly data normals -> mapper -> actor ...

however short or uchar the machine  says no data to generate normals from...
i manage to display a number of slices (#45-50) with SHORT but i get 4 instances of the model so i assume short is not correct ( i tried uchar but then no data again)

if anyone has vtk code to visualize this kind of data,i would be greatful if they could email it to me at c.panagiotou at cs.ucl.ac.uk

thanks in advance 
christos


-- 
---------------------------------------------------