[Insight-users] CovariantVectorImageExtractComponent
Luis Ibanez
luis.ibanez at kitware.com
Tue Nov 16 10:38:10 EST 2004
Hi Jesse,
The Z (third) component of a Vector is indexed as "2"
because we use the natural indexing order of C/C++.
So, if you want to extract:
X component --> use index [0]
Y component --> use index [1]
Z component --> use index [2]
By asking for index "3" in the command line arguments of
the CovariantVectorImageExtractComponent program you are
probably going to provoke a segmentation fault.
We should actually add an if() in order to test if the
index is in the range [0:2].
Regards,
Luis
--------------
Jesse wrote:
> Hi,
>
> Now I can get component X and Y, but can't get Z using
> CovariantVectorImageExtractComponent VectorDeformationField .mhd
> 11.mhd 22.mhd 3
>
> header file
>
>
> ObjectType = Image
>
> NDims = 3
>
> BinaryData = True
>
> BinaryDataByteOrderMSB = False
>
> DimSize = 200 200 176
>
> ElementNumberOfChannels = 3
>
> ElementType = MET_FLOAT
>
> ElementDataFile = 2.raw
>
>
> Bests
>
> Jesse
>
> */Luis Ibanez <luis.ibanez at kitware.com>/* wrote:
>
>
> Hi Jesse,
>
> What is the actual pixel type of your input image
> VectorDeformationField.mhd ?
>
>
> Note that this example is reading the image as Float,
> and then reducing it to unsigned short.
>
>
> Please post to the list the content of the MetaImage
> header file
>
> VectorDeformationField.mhd
>
>
> That will help us to check if the image dimensions
> in the header are what you expect.
>
>
> Thanks
>
>
> Luis
>
>
>
> --------------
> Jesse wrote:
> > Hi Luis,
> >
> > I got the new version and tested it.
> >
> > VectorDeformationField is about 81M , which include three
> > component, That is, each component should contain 27M, In line 71, I
> > modify it const unsigned int Dimension = 3; But after run
> > CovariantVectorImageExtractComponent VectorDeformationField .mhd
> 11.mhd
> > 22.m! hd 1, the reult image is all zero, in fact the component
> wasn't
> > zeros. in addition 11.mhd is 64K, 22.mhd 32k.
> >
> > Regards
> >
> > Jesse
> > */Luis Ibanez /* wrote:
> >
> >
> > Hi Jesse,
> >
> > Thanks for pointing this out.
> >
> > We just commited a fix for this file in to the CVS repository.
> >
> >
> http://www.itk.org/cgi-bin/viewcvs.cgi/Examples/IO/CovariantVectorImageExtractComponent.cxx?root=Insight&r1=1.7&r2=1.8
> >
> > Please give it a try and let us know if you find any problem,
> >
> >
> > Thanks
> >
> >
> > Luis
> >
> >
> >
> > ---------------
> > Jesse wrote:
> >
> > > Hi all
> > >
> > > I found a question in CovariantVectorImageExtractComponent.cxx,
> > There
> > > wasn't argv[2] in it. That is we can't get the non-normalized
> > output.
> > > Also, when i wa! nt to get the second component using ,
> > >
> > > CovariantVectorImageExtractComponent sr.mhd 11.mhd 22.mhd 2
> > >
> > > the reult image is all zero, infact the component wasn't zeros.
> > >
> > > Best
> > >
> > > Jesse
> > >
> > >
> >
> ------------------------------------------------------------------------
> > > Do you Yahoo!?
> > > Check out the new Yahoo! Front Page. www.yahoo.com
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at itk.org
> > > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
>
>
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Meet the all-new My Yahoo! <http://my.yahoo.com> – Try it today!
More information about the Insight-users
mailing list