[Insight-users] Kappa Sigma Clipping typedef error
Oleksandr Dzyubak
adzyubak at gmail.com
Thu Jul 3 11:35:37 EDT 2008
Dear ITKers,
Some while ago I decided to test the Kappa Sigma Clipping algorithm which
I downloaded from the Insight-journal web page.
http://insight-journal.org/midas/handle.php?handle=1926/367
In the paper which comes with an archive there is an explanation
how to use it and, in particular, the lines describing the types of
input/output images.
***********Begin code snippet*********
const int dim = 3;
typedef unsigned char PType;
typedef itk::Image< PType, dim > IType;
typedef itk::ImageFileReader< IType > ReaderType;
typedef itk::ImageFileWriter< IType > WriterType;
***********End code snippet*********
Of cousre, that is quite natural to keep an output segmented binary
image as an unsigned char type
but what about an input image. In my case I have input images in a
signed short format and
if I change the typedef for the input to signed short, I get an error below.
******* Begin Error ************
dzyubak at debian: /BUILD$ make
Scanning dependencies of target check
[100%] Building CXX object CMakeFiles/check.dir/check.cxx.o
/mnt/Public/ITK_Test/Kappa_Sigma_Clipping/Src/check.cxx: In function
'int main(int, char**)':
/mnt/Public/ITK_Test/Kappa_Sigma_Clipping/Src/check.cxx:42: error: no
matching function for call to 'itk::ImageFileWriter<itk::Image<unsigned
char, 3u> >::SetInput(itk::Image<short int, 3u>*)'
/usr/local/include/InsightToolkit/IO/itkImageFileWriter.txx:56: note:
candidates are: void itk::ImageFileWriter<TInputImage>::SetInput(const
TInputImage*) [with TInputImage = itk::Image<unsigned char, 3u>]
make[2]: *** [CMakeFiles/check.dir/check.cxx.o] Error 1
make[1]: *** [CMakeFiles/check.dir/all] Error 2
make: *** [all] Error 2
dzyubak at debian: /BUILD$
******* End Error ************
Does this mean that the algorithm can only work if the input type
matches the output?
If it does, then I have to extend the pipeline so to include the
rescaler, right?
I would appreciate any help on this matter.
Thanks,
Alex
More information about the Insight-users
mailing list