[Insight-users] Re: multimiresregistration thanks, vtk!

Luis Ibanez luis.ibanez at kitware.com
Sun, 22 Feb 2004 12:00:35 -0500


Hi Christos,

About your questions:

1) Thanks for pointing this out.  This is actually
    an error in the MetaImage headers. They should
    state  181 x 217 x 181 pixels.

    Since current they declare an inferior number of
    slices, this doesn't produce a problem other that
    the fact that the last slice is not used.


2) The CVS version of VTK has readers for MetaImages.
    http://www.vtk.org/doc/nightly/html/classvtkMetaImageReader.html
    That's the easy way to go.


3) If the volume appears replicated it is typically
    an indication that you are providing an incorrect
    interpretation of the pixel type.  For example,
    using unsigned int, but providing chars.


4) The .txt files are provided as they were received
    from the BrainWeb site. They are there only to
    account for the original source of the data.  The
    actual data is encoded in unsigned char, just as
    stated in the metaimage headers.


5) "Displaying accurately a brain volume"

    is an ill-posed statement. What is your definition of
    what a brain is ?  Does it includes the cerebelum ?
    Do you need to differentiate gray matter from
    white matter on the visualization ? How about CSF ?

    Visualization is a "language", it is only the
    carrier that you use for expressing an idea.

    There is no 'correct' visualization in the absolute
    sense of the term. There can only be visualizations
    that effectively convey the idea that you want to
    express.

    So the original question you should ask is:

    "What am I interested in seeing in this brain"

    Based on this new question, you can find a visualization
    method that will present this information to you.


6) The methods currently used in the Dashboard for
    testing the registration methods are based in
    constructed examples where we have intentionally
    transformed the images by known spatial transforms.


    You fill find a good description of evaluation methods
    in the publications by

         J.M. Fitzpatrick
         http://www.vuse.vanderbilt.edu/~jmf/

    and on the book:

        "Medical Image Registration"
         by Hajnal, Hill and Hawkes





Regards,



    Luis




---------------------------
Christos Panagiotou wrote:

> Dear Dear Luis :)
> 
> thank you very much for your fast reply ...
> 
> i got the point with the deformable registration ... i ll try to do this 
> "short" compilation of ready functions over the weekend !
> 
> one last set of (6) questions (not concerning itk but - vtk  :( )
> 
> i got the data you suggested from the brain web with the .mha headers.
> i see that there is an incompatibility among the dimensions provided by 
> brainweb and the .mha i found in your db
> xyz:  .mha gives 181 217 180, brainweb gives 181 217 181 ( i assume this 
> might be because the last slice is black - and you skipped it?) (_/*Q1*/_)
> 
> brainweb - 1e1a10f20.txt :
> BrainWeb download: PD ICBM normal 1mm pn3 rf20
> Modality=PD, Protocol=ICBM, Phantom_name=normal, Slice_thickness=1mm, 
> Noise=3%,
> INU=20%
> MINC volume info:
> image: signed__ short 0 to 4095
> image dimensions: zspace yspace xspace
>     dimension name         length         step        start
>     --------------                    ------         ----        -----
>     zspace                           181            1          -72
>     yspace                           217            1         -126
>     xspace                           181            1          -90
> Original MINC file size: 10.5 Mb
> 
> 
> 
> finaly, i use vtk's imagereader2 with filedimensionality set to 3 (as it 
> is one file containing all data) and
> data extent (1,181,1 217,1, 180) but vtk gives me so much trouble by 
> throwing an error like the following:
> File operation failed. row = -126, Read = 352, FilePos = -1 (and of 
> course no data to generate normals) (_/*Q2*/_)
> 
> (it works if i put lets say 50 in the final data extent variable but not 
> 180 nor 170)
> i am trying to get a descent result for the past 6-7 hours and nothing 
> nothing comes up!
> (the weird thing is that when i put a 50 - i get lets say the one third 
> of the volume but it appears 4 times in the window (one in each corner) 
> - thats another problem!(_/*Q3*/_))
> 
> i am using the following file:  brainweb1e1a10f20.raw
> where its .mha is:
>     NDims = 3
>     DimSize = 181 217 180
>     ElementType = MET_UCHAR ((_/*Q4*/_): the 1e1a10f20.txt i got from 
> kitware and accompanied the raw volume says its signed short, and vtk 
> reads it only if i say its signed short - why does it 
>                                                           say  unsigned 
> char in the .mha header? )
>     ElementSpacing = 1.0 1.0 1.0
>     ElementByteOrderMSB = False
>     ElementDataFile = brainweb1e1a10f20.raw
> 
> what i simply do to  visualize the volume is:
>   const char *fname = 
> "/home/christos/PhD/Data/raw/Brain1/Brain/brainweb1e1a10f20.raw";
>   vtkImageReader2 *v = vtkImageReader2::New();
>     v->SetDataExtent(1,180,1,217,1,180);
>     v->SetSwapBytes(2);
>     v->SetDataScalarTypeToShort();
>     v->SetFileName(fname);
>     v->SetFileDimensionality(3);
>     v->SetDataSpacing (1.0,1.0,1.0);
>     v->DebugOn();
>     v->Update();
> 
> which later on i pass v -> contour filter -> polydatanormals -> 
> polydatamapper -> actor  -> renderer -> window ...
> 
> finaly as (_/*Q5*/_) do you know if the above method is good enough for 
> displaying accurately a brain volume? ( i mean contours have gaps - 
> maybe marching cubes or a ray casting function that i think
> i saw in vtk would do better?)
> 
> Dear Luis, (and i mean Dear :) ), i know i ve tired you but some of the 
> above happenings seem greek to me (even when i am greek!)) so i would 
> ask for
> your enlightenment and precious time once again!
> 
> i attach the result jpg so you can see & believe the 4 brains!
> 
> thats all
> 
> thank you very much indeed
> christos panagiotou
> 
> p.s. (_/*Q6*/_) - what method does kitware use to evaluate the accuracy 
> of the registration?
> 
> p.s.2 i am really greatful for your help - i really need to do this as 
> soon as possible because i will use registration as part of my phd 
> research and
> the faster i have it working the more time i will have for some other 
> things i need to focus - thanks again
> 
> 
> 
> 
> ------------------------------------------------------------------------
>