| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0007027 | ITK | public | 2008-05-15 08:44 | 2009-09-19 09:48 | |||||
| Reporter | Mathieu Malaterre | ||||||||
| Assigned To | Mathieu Malaterre | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | OS | OS Version | |||||||
| Product Version | |||||||||
| Target Version | Fixed in Version | ITK-3-16 | |||||||
| Summary | 0007027: itkGDCMImageIO does not rescale properly when dealing with floating point images. | ||||||||
| Description | In the itkGDCMImageIO code the following code is incorrect for floating point source: template<class TBuffer, class TSource> void RescaleFunctionInverse(TBuffer* buffer, TSource *source, double slope, double intercept, size_t size) { size /= sizeof(TSource); if (slope != 1.0 && intercept != 0.0) { DUFF_DEVICE_8(size, *buffer++ = (TBuffer)((*source++ - intercept) / slope) ); } else if (slope == 1.0 && intercept != 0.0) { TSource sintercept = (TSource)intercept; if (sintercept == intercept) { DUFF_DEVICE_8(size, *buffer++ = (TBuffer)(*source++ - sintercept) ); } else { DUFF_DEVICE_8(size, *buffer++ = (TBuffer)(*source++ - intercept) ); } } else if (slope != 1.0 && intercept == 0.0) { DUFF_DEVICE_8(size, *buffer++ = (TBuffer)((*source++) / slope) ); } else { DUFF_DEVICE_8(size, *buffer++ = (TBuffer)(*source++) ); } } The solution is to use the well-known trick of: DUFF_DEVICE_8(size, *buffer++ = (TBuffer)((*source++ - intercept) / slope) + 0.5 ); | ||||||||
| Tags | No tags attached. | ||||||||
| Resolution Date | |||||||||
| Sprint | |||||||||
| Sprint Status | |||||||||
| Attached Files | |||||||||
| Relationships | |
| Relationships |
| Notes | |
|
(0014234) Mathieu Malaterre (developer) 2008-11-30 08:58 |
This is fixed in GDCM 2.x code path. |
|
(0014235) Mathieu Malaterre (developer) 2008-11-30 08:58 |
You need GDCM 2.0.10 > |
|
(0014256) Mathieu Malaterre (developer) 2008-11-30 11:42 |
Fixed. See http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0 [^] |
|
(0017636) Mathieu Malaterre (developer) 2009-09-19 09:48 |
You need GDCM 2.x |
| Notes |
| Issue History | |||
| Date Modified | Username | Field | Change |
| 2008-05-15 08:44 | Mathieu Malaterre | New Issue | |
| 2008-10-06 05:32 | Mathieu Malaterre | Status | new => assigned |
| 2008-10-06 05:32 | Mathieu Malaterre | Assigned To | => Mathieu Malaterre |
| 2008-11-30 08:58 | Mathieu Malaterre | Note Added: 0014234 | |
| 2008-11-30 08:58 | Mathieu Malaterre | Note Added: 0014235 | |
| 2008-11-30 08:58 | Mathieu Malaterre | Status | assigned => closed |
| 2008-11-30 08:58 | Mathieu Malaterre | Resolution | open => fixed |
| 2008-11-30 08:58 | Mathieu Malaterre | Fixed in Version | => ITK-3-10 |
| 2008-11-30 11:42 | Mathieu Malaterre | Note Added: 0014256 | |
| 2008-11-30 11:42 | Mathieu Malaterre | Status | closed => resolved |
| 2008-11-30 11:42 | Mathieu Malaterre | Fixed in Version | ITK-3-10 => |
| 2009-09-19 09:48 | Mathieu Malaterre | Note Added: 0017636 | |
| 2009-09-19 09:48 | Mathieu Malaterre | Status | resolved => closed |
| 2009-09-19 09:48 | Mathieu Malaterre | Fixed in Version | => ITK-3-16 |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |