[Insight-users] 3D Resampling

Luis Ibanez luis.ibanez at kitware.com
Thu May 4 09:21:00 EDT 2006


Hi Kevin,

Thanks for letting us know that you found the solution
to the problem.


    Regards,


        Luis



=================
Kevin Ming wrote:
> Hi Luis,
> 
> Just wanted to let you know that we were able to figure out the 
> resampling problem:  The z = 0 spacing for the image was incorrect, and 
> the resampling worked fine once the appropriate changes have been made 
> to header file and the algorithm.  Also, for the brightness and contrast 
> issue, it's due to the fact that the ANALYZE format we work with are 
> 32-bit images, so once we convert it to 8-bit ones the algorithm no 
> longer gives us any problems.
> 
> 
> Thank you for all your help,
> Kevin
> 
> On 5/2/06, *Kevin Ming* <ming.kevin at gmail.com 
> <mailto:ming.kevin at gmail.com>> wrote:
> 
>     Hi Luis,
> 
>     Let me know if you need further information.
> 
> 
>     Thank You,
>     Kevin
> 
> 
>     On 5/2/06, * Luis Ibanez* < luis.ibanez at kitware.com
>     <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>         Hi Kevin,
> 
> 
>         You can upload the image at the following web link:
> 
>         http://www.kitware.com/KitwareScripts/uploadfile.cgi
> 
> 
>         Please include all the information you have about the
>         Bruker file format.
> 
> 
>            Thanks
> 
> 
>               Luis
> 
> 
> 
>         =====================
>         Kevin Ming wrote:
>>  Hi Luis,
>>
>>  I've confirmed the following spacing specs for my image:
>>
>>  x = 0.1 mm
>>  y = 0.1 mm
>>  z = 1 mm
>>
>>  *But* the resampling only seems to kind of work for x = 0.01
>         mm and y =
>>  0.01 mm, "kind of" meaning only the 1st slice shows up
>         correctly, all
>>  other slice our black.  For the z spacing, I've tried quite a few
>>  different kinds of values between 0.001 mm and 2 mm (inclusive),
>>  including 1 mm of course, and the same problem persists.
>>
>>  All the MRI images that I have come directly from the MR
>         imaging centre,
>>  where I participate in the imaging process as well, so the images
>>  themselves should be of no problem.  But agian, the raw data I
>         get are
>>  in the Bruker format (the company that made the MRI machine),
>         so I have
>>  to convert them into ANALYZE format and go from there.  Would
>         it help if
>>  I sent you the images?
>>
>>  Thank You,
>>  Kevin
>>
>>  On 5/2/06, *Luis Ibanez* < luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>
>>  <mailto:luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>> wrote:
>>
>>
>>
>>     Hi Kevin,
>>
>>
>>     If you don't know what the spacing in your image is, you
>         should go
>>     back to whoever provided this image to you and obtain that
>         information.
>>
>>
>>
>>                           What is certain,
>>                     is that a Z spacing of 0.0
>>                           is *not* real.
>>
>>
>>     There is no point in having a 3D dataset with a null Z
>         spacing...
>>
>>
>>
>>     Maybe you should go back to the tool that you used for
>         converting
>>     your "Bruker" file.
>>
>>     Maybe you should use another tool...
>>
>>
>>     If your dataset has a collection of slices that are not at
>         equal
>>     spacing, you *will not* be able to process it with ITK
>         anyways,
>>     because ITK only supports datasets with uniform spacing.
>>
>>
>>     You probably don't need to be concerned about brightness or
>>     contrast until you solve the spacing issues...
>>
>>
>>     What is the original source of this dataset ?
>>
>>
>>
>>         Please let us know,
>>
>>
>>           Thanks
>>
>>
>>              Luis
>>
>>
>>
>>     =================
>>     Kevin Ming wrote:
>>      > Hi Luis,
>>      >
>>      > I'm actually not too sure what the Z spacing should be,
>         but when
>>     I tried
>>      > it with different values (e.g. 0.001, 0.01, 0.1) it gave
>         me black
>>     images
>>      > for all but the 1st slice.
>>      >
>>      > But in the ANALYZE format it gives me Size z (mm) =
>         0.00, so I assume
>>      > it's meant to be 0.  Actually, though, I had to convert the
>>     Bruker file
>>      > format into ANALYZE before using it, and during the
>         conversion it
>>     gives
>>      > me something along the lines of "your slices don't
>         appear to be
>>      > equi-distance, ANALYZE assuming equal spacing between
>>     slices."  Do you
>>      > think that may be the problem, or is it something else?
>>      >
>>      > What about the brightness and contrast issues?
>>      >
>>      > Thank You,
>>      > Kevin
>>      >
>>      > On 5/1/06, *Luis Ibanez* < luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>
>>     <mailto: luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>
>>      > <mailto: luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>
>>     <mailto:luis.ibanez at kitware.com
>         <mailto:luis.ibanez at kitware.com>>>> wrote:
>>      >
>>      >
>>      >
>>      >     Hi Kevin,
>>      >
>>      >     Is this a typo in your email ?
>>      >
>>      >
>>      >      >> Spacing (or in ANALYZE, Size) (mm):  x = 0.01, y
>         = 0.01,
>>     z = 0.00
>>      >
>>      >
>>      >     or
>>      >     do you *really* expect the Z spacing of your 3D
>         dataset to be
>>     NULL ?!!
>>      >
>>      >
>>      >     If that's the actual spacing in your dataset, that
>         can easily be
>>      >     the source of the problems that you are experiencing.
>>      >
>>      >
>>      >       Please let us know,
>>      >
>>      >
>>      >         Thanks
>>      >
>>      >
>>      >            Luis
>>      >
>>      >
>>      >     =======================
>>      >     Karthik Krishnan wrote:
>>      >      > Hi Kevin
>>      >      >
>>      >      > I would first check if you can read your Analyze
>         file. (There
>>      >     have been
>>      >      > reports in the past of certain Analyze files not
>         being read in
>>      >     correctly).
>>      >      > Use InsightApplications/ImageViewer to open your
>         Analyze
>>     file and
>>      >     check
>>      >      > if you see what you expect to see.
>>      >      >
>>      >      > bye
>>      >      > -karthik
>>      >      >
>>      >      > Kevin Ming wrote:
>>      >      >
>>      >      >> Hi,
>>      >      >>
>>      >      >> I'm trying to rigidly transform some 3D image
>         data for
>>     test in
>>      >      >> registration, but can't seem to figure out what
>         kind
>>     problems I'm
>>      >      >> running into:
>>      >      >>
>>      >      >> 1)  The program only seems to resample the 1st
>         out of a
>>     total of 12
>>      >      >> slices from my 3D image, all other slices are
>         just a
>>     repeat of the
>>      >      >> first slice.  I tried playing around with
>         spacing[2] = x for
>>      >     Dimension
>>      >      >> = 3 where x is any value greater than 0, but
>         instead the
>>     program
>>      >     would
>>      >      >> give me every slice other than the 1st one black.
>>      >      >>
>>      >      >> 2)  Also, all the output images seem to give me
>         really high
>>      >     brightness
>>      >      >> and contrast values.  For example my original
>         images have
>>      >     brightness =
>>      >      >> 2204933.4355 and contrast = 4277002.0027 , and
>         the output
>>     would be
>>      >      >> brightness = 44324303030.1732 and contrast =
>         9999999.0000
>>      >     .  Does this
>>      >      >> have to do with the fact that I changeed the
>>     InputPixelType and
>>      >      >> OutputPixelType to float?
>>      >      >>
>>      >      >> In generally I think it's my spacing and maybe
>         origin values
>>      >     that are
>>      >      >> creating these problems, so here are what I
>         think they
>>     should be:
>>      >      >>
>>      >      >> Spacing (or in ANALYZE, Size) (mm):  x = 0.01 ,
>         y = 0.01,
>>     z = 0.00
>>      >      >> Origin (same name in ANALYZE) (vxl):  x = 0.00 , y =
>>     0.00, z = 0.00
>>      >      >>
>>      >      >>
>>      >      >> Thank You,
>>      >      >> Kevin
>>      >      >>
>>      >      >>
>>      >
>>    
>         ------------------------------------------------------------------------
>>      >      >>
>>      >      >> _______________________________________________
>>      >      >> Insight-users mailing list
>>      >      >> Insight-users at itk.org
>         <mailto:Insight-users at itk.org> <mailto:Insight-users at itk.org
>         <mailto:Insight-users at itk.org>>
>>     <mailto: Insight-users at itk.org
>         <mailto:Insight-users at itk.org> <mailto: Insight-users at itk.org
>         <mailto:Insight-users at itk.org>>>
>>      >      >>
>         http://www.itk.org/mailman/listinfo/insight-users
>         <http://www.itk.org/mailman/listinfo/insight-users>
>>      >     < http://www.itk.org/mailman/listinfo/insight-users>
>>      >      >>
>>      >      >>
>>      >      > _______________________________________________
>>      >      > Insight-users mailing list
>>      >      > Insight-users at itk.org
>         <mailto:Insight-users at itk.org> <mailto: Insight-users at itk.org
>         <mailto:Insight-users at itk.org>>
>>     <mailto: Insight-users at itk.org
>         <mailto:Insight-users at itk.org> <mailto:Insight-users at itk.org
>         <mailto:Insight-users at itk.org>>>
>>      >      > http://www.itk.org/mailman/listinfo/insight-users
>         <http://www.itk.org/mailman/listinfo/insight-users>
>>      >      >
>>      >      >
>>      >
>>      >
>>      >
>>
>>
>>
> 
> 
> 
> 




More information about the Insight-users mailing list