[Insight-users] Re: GetOutput() : not an itkImage method
Luis Ibanez
luis.ibanez at kitware.com
Mon, 19 Jan 2004 14:20:08 -0500
Hi David,
The problem is that you declared the function
imhist()
to be a member method of the class
"ProcesadorImagenEspermas"
in
class ProcesadorImagenEspermas
{
private:
unsigned long * imhist (const RGBImageType *, colorRGB);
unsigned long TamImg(const RGBImageType *);
void getEspermasImagen (RGBImageType::Pointer);
public:
void procesarImgEspermas(char *);
};
But in the implementation you define the function
as a global function instead of a member of the
class.
You should define the function in the same way
you are defining the method "getEspermasImagen".
That is, in the .cpp file:
unsigned long *
imhist (const RGBImageType * NomFich, colorRGB color){
must be
unsigned long *
ProcessadorImagenEspermas::
imhist (const RGBImageType * NomFich, colorRGB color){
------------------------------
This is basic C++...
You may want to review a bit your C++ concepts
before going further with ITK, that will save
you some time and unnecessary suffering.
Regards,
Luis
----------------
David wrote:
> I make Rebuild_All, but the error don't disappear...
> I think the problem is in the bad use of RGBImageType::pointer in the
> functions, but I don't understand the matter...
>
> I attach you my files for if you don't care to look at my program
>
> thank you once again.
>
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "David" <gva02 at elai.upm.es>
> Cc: <Insight-users at itk.org>
> Sent: Monday, January 19, 2004 6:47 PM
> Subject: Re: GetOutput() : not an itkImage method
>
>
>
>>Hi David,
>>
>>
>>If you get a link error it is likely
>>that the implementation of the function
>>was not recompiled using the new signature.
>>
>>Did you recompiled the file where the
>>function is implemented ?
>>
>>Please do a Rebuild_All in your
>>project. (or clean and then build).
>>
>>
>>Regards,
>>
>>
>> Luis
>>
>>
>>-----------------------------------