[Insight-developers] Analyze IO - patch
Bill Lorensen
bill.lorensen at gmail.com
Mon Feb 26 12:45:18 EST 2007
Kent,
E-mail the file to me(not diffs) and I'll take care of it,
Bill
On 2/26/07, kent williams <norman-k-williams at uiowa.edu> wrote:
>
> This patch will do two things: warn if a non-Analyze oriented image is
> read
> from disk, and warn instead of throw an exception if a non-Analyze
> oriented
> image is about to be written to disk.
>
> I'm locked out of the repository for release right now, I'll leave it to
> the
> gurus to decide what to do with this.
>
> Index: itkAnalyzeImageIO.cxx
> ===================================================================
> RCS file: /cvsroot/Insight/Insight/Code/IO/itkAnalyzeImageIO.cxx,v
> retrieving revision 1.76
> diff -c -r1.76 itkAnalyzeImageIO.cxx
> *** itkAnalyzeImageIO.cxx 14 Feb 2007 17:51:19 -0000 1.76
> --- itkAnalyzeImageIO.cxx 26 Feb 2007 16:13:18 -0000
> ***************
> *** 959,968 ****
> coord_orient =
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PIR;
> break;
> case itk::AnalyzeImageIO::ITK_ANALYZE_ORIENTATION_RIP_CORONAL:
> ! // fall thru
> default:
> coord_orient =
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP;
> ! itkDebugMacro( "Unknown orientation in file " << m_FileName );
> }
> //An error was encountered in code that depends upon the valid
> coord_orientation.
> typedef SpatialOrientationAdapter OrientAdapterType;
> --- 959,969 ----
> coord_orient =
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_PIR;
> break;
> case itk::AnalyzeImageIO::ITK_ANALYZE_ORIENTATION_RIP_CORONAL:
> ! coord_orient =
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP;
> ! break;
> default:
> coord_orient =
> itk::SpatialOrientation::ITK_COORDINATE_ORIENTATION_RIP;
> ! itkWarningMacro( "Unknown orientation in file " << m_FileName
> );
> }
> //An error was encountered in code that depends upon the valid
> coord_orientation.
> typedef SpatialOrientationAdapter OrientAdapterType;
> ***************
> *** 1178,1184 ****
> break;
> default:
>
>
> this->m_hdr.hist.orient=itk::AnalyzeImageIO::ITK_ANALYZE_ORIENTATION_RIP_COR
> ONAL;
> ! itkExceptionMacro( "ERROR: Analyze 7.5 File Format Only Allows
> RPI,
> PIR, and RIP Orientation " );
> }
>
> if(itk::ExposeMetaData<std::string>(thisDic,ITK_FileOriginator,temp))
> --- 1179,1185 ----
> break;
> default:
>
>
> this->m_hdr.hist.orient=itk::AnalyzeImageIO::ITK_ANALYZE_ORIENTATION_RIP_COR
> ONAL;
> ! itkWarningMacro( "ERROR: Analyze 7.5 File Format Only Allows RPI,
> PIR, and RIP Orientation " );
> }
>
> if(itk::ExposeMetaData<std::string>(thisDic,ITK_FileOriginator,temp))
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20070226/4c53fea8/attachment.htm
More information about the Insight-developers
mailing list