+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
/*=========================================================================
Program: wxMaracas
Module: $RCSfile: volume.cxx,v $
Language: C++
- Date: $Date: 2010/04/20 16:11:40 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2012/11/15 14:16:13 $
+ Version: $Revision: 1.10 $
Copyright: (c) 2002, 2003
License:
switch( _type ) {
- case CHAR: p = ( double )( ( int8_t*** )_images )[ z ][ y ][ x ]; break;
- case FLOAT: p = ( double )( ( float*** )_images )[ z ][ y ][ x ]; break;
- case DOUBLE: p = ( double )( ( double*** )_images )[ z ][ y ][ x ]; break;
- case INT: p = ( double )( ( int32_t*** )_images )[ z ][ y ][ x ]; break;
- case SHORT: p = ( double )( ( int16_t*** )_images )[ z ][ y ][ x ]; break;
- case UCHAR: p = ( double )( ( uint8_t*** )_images )[ z ][ y ][ x ]; break;
+ case CHAR: p = ( double )( ( int8_t*** )_images )[ z ][ y ][ x ]; break;
+ case FLOAT: p = ( double )( ( float*** )_images )[ z ][ y ][ x ]; break;
+ case DOUBLE: p = ( double )( ( double*** )_images )[ z ][ y ][ x ]; break;
+ case INT: p = ( double )( ( int32_t*** )_images )[ z ][ y ][ x ]; break;
+ case SHORT: p = ( double )( ( int16_t*** )_images )[ z ][ y ][ x ]; break;
+ case UCHAR: p = ( double )( ( uint8_t*** )_images )[ z ][ y ][ x ]; break;
case UINT: p = ( double )( ( uint32_t*** )_images )[ z ][ y ][ x ]; break;
case USHORT: p = ( double )( ( uint16_t*** )_images )[ z ][ y ][ x ]; break;
default: p = 0.0; break;
case CHAR:
switch( type ) {
- case SHORT: convertCastT( ( char* )_raw, ( int16_t* )buffer, size ); break;
- case INT: convertCastT( ( char* )_raw, ( int32_t* )buffer, size ); break;
+ case SHORT: convertCastT( ( char* )_raw, ( int16_t* )buffer, size ); break;
+ case INT: convertCastT( ( char* )_raw, ( int32_t* )buffer, size ); break;
case USHORT: convertCastT( ( char* )_raw, ( uint16_t* )buffer, size ); break;
case UINT: convertCastT( ( char* )_raw, ( uint32_t* )buffer, size ); break;
- case FLOAT: convertCastT( ( char* )_raw, ( float* )buffer, size ); break;
- case DOUBLE: convertCastT( ( char* )_raw, ( double* )buffer, size ); break;
+ case FLOAT: convertCastT( ( char* )_raw, ( float* )buffer, size ); break;
+ case DOUBLE: convertCastT( ( char* )_raw, ( double* )buffer, size ); break;
case UCHAR: convertCastT( ( char* )_raw, ( uint8_t* )buffer, size ); break;
default : break;
case SHORT:
switch( type ) {
- case CHAR: convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
- case INT: convertCastT( ( int16_t* )_raw, ( int32_t* )buffer, size ); break;
+ case CHAR: convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
+ case INT: convertCastT( ( int16_t* )_raw, ( int32_t* )buffer, size ); break;
case USHORT: convertCastT( ( int16_t* )_raw, ( uint16_t* )buffer, size ); break;
case UINT: convertCastT( ( int16_t* )_raw, ( uint32_t* )buffer, size ); break;
- case FLOAT: convertCastT( ( int16_t* )_raw, ( float* )buffer, size ); break;
- case DOUBLE: convertCastT( ( int16_t* )_raw, ( double* )buffer, size ); break;
- case UCHAR: convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
+ case FLOAT: convertCastT( ( int16_t* )_raw, ( float* )buffer, size ); break;
+ case DOUBLE: convertCastT( ( int16_t* )_raw, ( double* )buffer, size ); break;
+ case UCHAR: convertCastT( ( int16_t* )_raw, ( uint8_t* )buffer, size ); break;
default : break;
} // fswitch
break;