[Insight-users] Reading input into Geodesic Active Contour Shape
Prior Level Set Image Filter
Luis Ibanez
luis.ibanez at kitware.com
Fri Nov 9 18:04:06 EST 2007
Hi Tomi,
It will be sooooooo nice if you share with us
1) The *EXACT* error message that you got
2) The declaration of ReaderType
That will help a lot to identify the source of the problem,
Thanks
Luis
------------------------
toluwalase lasaki wrote:
> Hi all,
>
> I need some help figuring out what the problem is with the piece of code
> pasted below. What I am trying to do is read the principal mode shape
> images (4.mha files) into the Geodesic Active Contour Shape Prior Level
> Set Image Filter.cxx. The files are named Modes_01 - Modes_04 and saved
> at the specified location. I'm not quite sure what is wrong but I get an
> error that says something about the vector length (???).
>
> std::vector<InternalImageType::Pointer> shapeModeImages( numberOfPCAModes );
> const std::string FilePref = "C:\\Documents and
> Settings\\olasaki\\Desktop\\images\\results\\Modes_";
> char *Suff = new char[20];
> std::string shapeModeFileNames;
>
> for (int ModeNumber = 1; ModeNumber <=4; ModeNumber++)
> {
> sprintf(Suf, "%02d.mha", ModeNumber);
> shapeModeFileNames = FilePref + Suf;
> ReaderType::Pointer shapeModeReader = ReaderType::New();
> shapeModeReader->SetFileName( shapeModeFileNames.c_str() );
> shapeModeReader->Update();
> shapeModeImages[ModeNumber] = shapeModeReader->GetOutput();
> }
> shape->SetMeanImage( meanShapeReader->GetOutput() );
> shape->SetPrincipalComponentImages( shapeModeImages );
>
> Does anyone notice something I might have done wrong?
>
> Thanks,
> Tomi L.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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