Hi Aida,

    I found the cause of the conversion of the image pixel type to float.
The ITK Nifty reader checks if the image needs to be rescaled using the
member variable RescaleScope. The value of this variable is 0.0045 for your
image and then the image is rescaled. For rescaling the image, the pixel
type needs to be changed to float. This is the piece of code from the file
itkNiftiImageIO.cxx:

  // if rescale is necessary, promote type reported
  // to ImageFileReader to float
  if(this->MustRescale())
    {
    if(this->m_ComponentType == CHAR ||
       this->m_ComponentType == UCHAR ||
       this->m_ComponentType == SHORT ||
       this->m_ComponentType == USHORT ||
       this->m_ComponentType == INT ||
       this->m_ComponentType == UINT ||
       this->m_ComponentType == LONG ||
       this->m_ComponentType == ULONG)
      {
      this->m_ComponentType = FLOAT;
      }
    }

    I hope this can help you. However, if you want to know more details
maybe you could contact ITK mailing list.

Best regards,
Xavi


2012/12/21 Aida Ninyerola <aida.ninyer...@gmail.com>

> Hi,
>
> We have an output image from SPM8 that we have opened with GIMIAS. It's a
> niifti format but with separated hdr + img files.
>
> When we check the data information we find that data type is float. But
> checking the same image with mricro it says that it's a 16-bit int image.
> We have also check the dimensions of the img file and it matches with
> 16-bit int data type. But if you take a look to the different intensity
> values you find that they are decimal values.
>
> We don't know what to think about. Maybe it's a problem from spm or a
> problem from the other two programs. The fact is that we need to know this
> data type as it's going to be necessary for later processing processes.
>
> If you need this image, I can send it.
>
> Thank you very much for your attention,
> Aida
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Gimias-developers mailing list
> Gimias-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gimias-developers
>
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Gimias-developers mailing list
Gimias-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gimias-developers

Reply via email to