[Insight-users] Re: Smoothing filters and Byte Order

Luis Ibanez luis.ibanez at kitware.com
Tue Jan 11 14:00:08 EST 2005


Hi Neha,

There is no relationship between the use of smoothing
filters and the byte order used for writing.

The byte order is decided by the ImageIO object used
by the ImageFileWriter.

If you want to change the byte order, simply invoke
the method


          SetByteOrder()


in the ImageIO class. Those are all the classes deriving
from ImageIOBase
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html



   Regards,


      Luis



-------------------
neha k wrote:

> Hello Luis,
>  
> Thanks for your reply.  I have one more question about the Smoothing 
> filters such as CurvatureFlow, RecursiveGaussianIIR filters.  I have big 
> endian Brain MRS.  When given those images as i/p to smoothing, it 
> creates o/p with little endian.  O/p image contains black border on the 
> white border of brain (skull area).  I see this, may be because of 
> change in endian. Why do these filters change the endian? Is it 
> because I am working on PC, filters create o/p with Little Endian?
> Smoothing filter creates .mhd file with ByteOrder = False while original 
> image has ByteORder = True.
>  
> Neha
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
> 
> 
>     Hi Neha,
> 
> 
>     The radius of the BallStructuring element can actually be set
>     to different values in X and Y (... and any other dimension
>     if you are using images of dimension larger than 2).
> 
> 
> 
>     Please read the Doxygen documentation for this class:
> 
>     http://www.itk.org/Insight/Doxygen/html/classitk_1_1BinaryBallStructuringElement.html
> 
> 
> 
>      > A BinaryBallStructuringElement has an N-dimensional radius. The
>      > radius is defined separately for each dimension as the number of
>      > pixels that the neighborhood extends outward from the center pixel.
>      > For example, a 2D BinaryBallStructuringElement object with a radius
>      > of 2x3 has sides of length 5x7.
> 
> 
>     The code will look like:
> 
> 
> 
>     BinaryBallStructuringElementType::RadiusType radius;
> 
>     radius[0] = 1;
>     radius[1] = 2;
> 
>     ball->SetRadius( r! adius );
> 
>     // for a structuring element of size 3x5
> 
> 
> 
> 
> 
>     Regards,
> 
> 
>     Luis
> 
> 
> 
>     -------------------
>     neha k wrote:
> 
>      > Hello All,
>      >
>      > I am looking for structuring element in ITK that has rectnagular
>      > structuring element, since I need to have separate radius for X
>     and Y.
>      > The default one in ITK is BallStructuringElement which applies
>      > same value in X and Y. how can i get structuring element with
>     different
>      > values for x and y? do i have to define such element or there is one
>      > already avilable in itk?
>      >
>      > thanks
>      > neha
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Meet the all-new My Yahoo! <http://my.yahoo.com> – Try it today!






More information about the Insight-users mailing list