[Insight-users] How to make the input of a filter to its output
Raghu Venkatram
raghu.venkatram at gmail.com
Sat Oct 30 09:50:02 EDT 2004
Hi Pan,
typedef itk::FlipImageFilter <ImageType > fFilterType;
fFilterType::Pointer filter1 = fFilterType::New();
typedef fFilterType::FlipAxesArrayType FlipAxesArrayType;
FlipAxesArrayType flipArray1;
flipArray1[0] = 0;
flipArray1[1] = 1;
flipArray1[2] = 1;
filter1->SetFlipAxes(flipArray1);
filter1->SetInput(inputImage);
filter1->Update();
ImageType::Pointer fixedImage = Reader1->GetOutput();
you change the flip array values to flip around the desired axis.
-Raghu
On Sat, 30 Oct 2004 20:06:52 +0800 (CST), Pan Ross
<rosspan2004 at yahoo.com.cn> wrote:
>
>
> I want to make the input of a filter to its output. But I do not know how to
> do it. I have write the following code, but there are some errors when I run
> the program. Could anyone help me?
>
> ImageType::Pointer workImage;
> workImage = imageReader->GetOutput();
> ...
> ...
> FlipFilterType::Pointer flip = FlipFilterType::New();
> flip->SetInput(workImage);
> FlipFilterType::FlipAxesArrayType flipAxesSet=flip->GetFlipAxes();
> flipAxesSet[1]=true;
> flip->SetFlipAxes(flipAxesSet);
> workImage = flip->GetOutput();
>
> the error is:
> itk::InvalidRequestedRegionError @ 0x0012eeec
>
>
> ________________________________
> Do You Yahoo!?
> 150万曲MP3疯狂搜,带您闯入音乐殿堂
> 美女明星应有尽有,搜遍美图、艳图和酷图
> 1G就是1000兆,雅虎电邮自助扩容!
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
More information about the Insight-users
mailing list