projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r609: *** empty log message ***
[ctsim.git]
/
libctsim
/
imagefile.cpp
diff --git
a/libctsim/imagefile.cpp
b/libctsim/imagefile.cpp
index 134a0c59f2ed525762ec893f118402c39511b452..d0474045c9055744faa7dcde3a9cf468e213582e 100644
(file)
--- a/
libctsim/imagefile.cpp
+++ b/
libctsim/imagefile.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (c) 1983-2001 Kevin Rosenberg
**
-** $Id: imagefile.cpp,v 1.3
8 2001/03/01 20:02:18
kevin Exp $
+** $Id: imagefile.cpp,v 1.3
9 2001/03/02 02:08:14
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-644,7
+644,7
@@
bool
ImageFile::log (ImageFile& result) const
{
if (m_nx != result.nx() || m_ny != result.ny()) {
ImageFile::log (ImageFile& result) const
{
if (m_nx != result.nx() || m_ny != result.ny()) {
- sys_error (ERR_WARNING, "Difference sizes of images [ImageFile::
invertPixelValues
]");
+ sys_error (ERR_WARNING, "Difference sizes of images [ImageFile::
log
]");
return false;
}
return false;
}
@@
-666,8
+666,12
@@
ImageFile::log (ImageFile& result) const
std::complex<double> cResult = std::log (cLHS);
vResult[ix][iy] = cResult.real();
vResultImag[ix][iy] = cResult.imag();
std::complex<double> cResult = std::log (cLHS);
vResult[ix][iy] = cResult.real();
vResultImag[ix][iy] = cResult.imag();
- } else
- vResult[ix][iy] = ::log (vLHS[ix][iy]);
+ } else {
+ if (vLHS[ix][iy] > 0)
+ vResult[ix][iy] = ::log (vLHS[ix][iy]);
+ else
+ vResult[ix][iy] = 0;
+ }
}
}
}
}
@@
-1310,21
+1314,11
@@
ImageFile::importImage (const char* const pszFormat, const char* const pszFilena
else if (iFormatID == IMPORT_FORMAT_PNG)
return readImagePNG (pszFilename);
#endif
else if (iFormatID == IMPORT_FORMAT_PNG)
return readImagePNG (pszFilename);
#endif
-#ifdef HAVE_CTN_DICOM
- else if (iFormatID == IMPORT_FORMAT_DICOM)
- return readImageDicom (pszFilename);
-#endif
sys_error (ERR_SEVERE, "Invalid format %s [ImageFile::importImage]", pszFormat);
return false;
}
sys_error (ERR_SEVERE, "Invalid format %s [ImageFile::importImage]", pszFormat);
return false;
}
-bool
-ImageFile::readImageDicom (const char* const pszFile)
-{
- return false;
-}
-
void
ImageFile::skipSpacePPM (FILE* fp)
{
void
ImageFile::skipSpacePPM (FILE* fp)
{