[Insight-users] Read Wrong Values from Image
Bill Lorensen
bill.lorensen at gmail.com
Wed Feb 22 08:32:40 EST 2012
What kind of dicom image is it? CT, MR, PET...
On Wed, Feb 22, 2012 at 6:33 AM, Martin Waitzbauer <mazzok at gmx.at> wrote:
> Hellom
>
> Im experiencing a strange error in the code
>
> typedef float PixelType;
> typedef itk::Image< PixelType, Dimension > ImageType;
> typedef itk::ImageFileReader< ImageType > FixedImageReaderType;
> typename FixedImageReaderType::Pointer fixedImageReader
> = FixedImageReaderType::New();
> typename itk::GDCMImageIO::Pointer DCMimageIO;
> DCMimageIO = itk::GDCMImageIO::New();
>
>
> fixedImageReader->SetImageIO(DCMimageIO);
> try
> {
> fixedImageReader->Update();
> }
> catch( itk::ExceptionObject& err )
> {
> std::cout << "Could not read one of the input images." << std::endl;
> std::cout << err << std::endl;
> exit( EXIT_FAILURE );
> }
> typedef itk::MinimumMaximumImageCalculator<ImageType> MinMaxType;
> MinMaxType::Pointer minmaxcalc = MinMaxType::New();
> minmaxcalc->SetImage(fixedImageReader->GetOutput());
> minmaxcalc->Compute();
> int min = minmaxcalc->GetMinimum();
> int max = minmaxcalc->GetMaximum();
>
>
>
> The min / Max values give 8833/ 16093 respectively, although opening the input image in ImageJ for example shows values from 290-7750 only
>
> what am i doing wrong here, someboday knows an answer?
>
>
> Merci!
>
>
> Regards, M
>
> --
> NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
> Jetzt informieren: http://www.gmx.net/de/go/freephone/
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
--
Unpaid intern in BillsBasement at noware dot com
More information about the Insight-users
mailing list