[ITK-users] Get RescaleIntercept

Matt McCormick matt.mccormick at kitware.com
Mon Nov 24 20:47:31 EST 2014


Hi Matias,

  reader->UpdateOutputInformation();

must be called for gdcmImageIO to parse the tags.

HTH,
Matt


On Mon, Nov 24, 2014 at 7:31 PM, Matias Montroull <matimontg at gmail.com> wrote:
> Hi,
>
> I'm struggling with code I did to get the RescaleIntercept of an image.
>
> It's simple as this:
>
> typedef itk::GDCMImageIO ImageIOTypeGDCM;
> ImageIOTypeGDCM::Pointer gdcmImageIO = ImageIOTypeGDCM::New();
> reader->SetImageIO( gdcmImageIO );
>
> double intercept = gdcmImageIO->GetRescaleIntercept();
> std::cout << "Rescale Intercept value: " << intercept << std::endl;
>
> Now, the last line returns "0" and actually the tag (0028|1052) reads
> "-1000"
>
> Is there any issues with the code or something I missed?
>
> _____________________________________
> 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.php
>
> 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://public.kitware.com/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list