creaImageIO_lib
creaImageIO Namespace Reference

Namespaces

namespace  tree
 

Classes

class  AbstractImageReader
 Abstract image reader. More...
 
class  DicomImageReader
 Concrete image reader for DICOM images. More...
 
class  DicomImageScanner
 Concrete image reader for DICOM images. More...
 
struct  OutputAttr
 Central controler of the gimmick application. More...
 
class  Gimmick
 
class  ImageExtent
 Class used to represent the actual state of the image selected and to perform comparisons on its values. More...
 
struct  OutStrGimmick
 
class  GimmickView
 Abstract class that handles views, attributes and previews (GUI) for Gimmick. More...
 
class  ImagePointerHolder
 
class  ImageReader
 Generic image reader which uses all the specific concrete image reader of the lib (tif, jpg, dicom, ...) More...
 
class  IndexedHeap
 Indexed priority queues handled by binary trees. More...
 
class  Listener
 
class  ThreadedImageReader
 
class  MultiThreadImageReaderUser
 
class  MultiThreadImageReader
 Class that allows parallel lectures of several images. More...
 
class  OutputModel
 
class  PACSConnection
 
class  Settings
 
class  SimpleView
 
class  SQLiteTreeHandler
 Concrete TreeHandler which manages a Tree stored in a sqlite database. More...
 
class  AddList
 Represents the list of currently added files. More...
 
class  RemoveList
 Represents the list of currently removed files. More...
 
class  Synchronizer
 In charge of the synchronization of the database and the disk state. More...
 
class  TimestampDatabaseHandler
 Concrete TreeHandler which manages a Tree stored in a sqlite database. More...
 
class  TreeHandler
 Abstract class which 'handles' a Tree structure. More...
 
class  TreeHandlerImageAdder
 Object which can add images files to a TreeHandler. Is able to parse (recursively) a part of a filesystem to look for known images and load their attributes in order to add the images to a Tree (submission via a TreeHandler::AddBranch) More...
 
class  TreeView
 Abstract class that handles the view of a Tree through its TreeHandler. More...
 
struct  Ultrasonix_header
 
class  UltrasonixImageReader
 Concrete image reader for ultrasonix 'rf' files. More...
 
class  VtkImageReader
 Concrete image reader based on a vtkImageReader2. More...
 
class  WxAnySimpleDlg
 Simple Wxwidgets interface to select file(s) or directory or from creaImageIO database to display. More...
 
class  WxAttributeSelectionPanel
 
class  WxCustomizeConfigPanel
 
class  WxDescriptorPanel
 
class  WxDumpPanel
 Display all dicom tags from a given DICOM file. More...
 
class  WxEditFieldsPanel
 
class  WxExportDlg
 
class  WxGimmickFrame
 
class  WxGimmickPanel
 
class  WxGimmickReaderDialog
 
class  WxGimmickTools
 
class  WxGimmickView
 Concrete derivative of GimmickView which implements a wxWidgets-based view. More...
 
class  WxListenerPanel
 
class  WxOutputDlg
 
class  WxPACSConnectionPanel
 
class  WxSimpleDlg
 Simple Wxwidgets interface to select file(s) or directory or from creaImageIO database to display. More...
 
struct  ItemData
 Data stored by the list items. More...
 
class  WxTreeView
 Abstract class that handles the view of a Tree through its TreeHandler. More...
 
class  RemoveAlertDlg
 
class  WxViewerPlayer
 
class  WxViewer
 

Typedefs

typedef std::map< std::string,
std::string > 
mapInfoDicom
 

Enumerations

enum  {
  TOOL_ADDFILES_ID = 1, TOOL_ADDDIR_ID = 2, TOOL_ADDDATABASE_ID = 3, TOOL_REMOVE_ID = 4,
  TOOL_SYNCHRONIZE_ID = 5, TOOL_HELP_ID = 6, TOOL_SETTINGS_ID = 7, TOOL_TOOLS_ID = 8,
  TOOL_CREATEDB_ID = 9, TOOL_PACS_ID = 10
}
 
enum  icon_id {
  Icon_create_database, Icon_accept, Icon_add, Icon_folder_down,
  Icon_page_down, Icon_database_add, Icon_remove, Icon_synchronize,
  Icon_help, Icon_settings, Icon_tools
}
 

Functions

std::string irclean (const std::string &str)
 
bool GimmickReaderDialog (std::vector< vtkImageData * > &images, const std::string i_namedescp, const std::string i_namedb="Local Database", const std::string &title="Select images", int posx=0, int posy=0, int sizex=1200, int sizey=800, int image_min_type=2, int image_max_type=3, int image_out_dim=2, int nb_threads=1)
 Pops up a WxGimmickReaderDialog returns true if the user clicked 'Ok', false if 'Cancel' and fills the vector of images. More...
 
template<class T , class C , class I >
std::ostream & operator<< (std::ostream &, const IndexedHeap< T, C, I > &)
 
template<class T , class CT , class IT >
std::ostream & operator<< (std::ostream &s, const IndexedHeap< T, CT, IT > &t)
 
char * format_sql (const std::string &s)
 
void SQLformat (std::string i_str, std::string &o_str)
 
void RegisterGimmickMessageTypes ()
 
void SetGimmickMessageLevel (int l)
 
void SetGimmickDebugMessageLevel (int l)
 
void deleteGimmickDebugMessage ()
 
bool ReadHeader (FILE *Ultrasonix_file, Ultrasonix_header &h)
 
void SplitExtensionsString (const std::string &str, const std::string &delimiters, std::vector< std::string > &tokens)
 
template<typename TImage >
class __declspec(dllexport)
WxISimpleDlg 
~WxISimpleDlg ()
 Simple Wxwidgets interface to select file(s) or directory or from creaImageIO database to display. More...
 
void setExts (std::vector< std::string >)
 
void OnReadFile (wxCommandEvent &event)
 Callback to read file(s) More...
 
void OnReadDirectory (wxCommandEvent &event)
 Callback to read directory, no recursive. More...
 
void OnReadGimmick (wxCommandEvent &event)
 Callback to select from creaImageIO database. More...
 
std::vector< vtkImageData * > getVtkImagesSelected ()
 return a vtkImageData vector of selected images, if available More...
 
std::vector< typename
TImage::Pointer > 
getImagesSelected ()
 return a itkImage vector of selected images, if available More...
 
wxString getInfoImage ()
 
void split4Din3Dvtk (const std::string &i_dir)
 
void split3Din3Dvtk ()
 
void set (bool i_dicom)
 
std::vector< boost::any > & getAnyImages ()
 
void readImg (const std::string &i_name)
 
void readDicomImg (const std::vector< std::string > &i_names)
 

Variables

const int ID_COMBO = 180
 
const int icon_number = 11
 
std::vector< boost::any > m_AnyImages
 
std::vector< std::string > m_exts
 
std::string namedescp
 
std::string namedb
 
wxString infoimage
 
bool m_dicom
 
SimpleView m_view
 interface to read data More...
 
std::vector< typename
TImage::Pointer > 
m_Iresults
 
std::vector< vtkImageData * > m_Vresults
 

Typedef Documentation

typedef std::map<std::string, std::string> creaImageIO::mapInfoDicom

Definition at line 63 of file creaImageIOGimmickView.h.

Enumeration Type Documentation

anonymous enum
Enumerator
TOOL_ADDFILES_ID 
TOOL_ADDDIR_ID 
TOOL_ADDDATABASE_ID 
TOOL_REMOVE_ID 
TOOL_SYNCHRONIZE_ID 
TOOL_HELP_ID 
TOOL_SETTINGS_ID 
TOOL_TOOLS_ID 
TOOL_CREATEDB_ID 
TOOL_PACS_ID 

Definition at line 79 of file creaImageIOWxGimmickView.cpp.

80  {
81  TOOL_ADDFILES_ID = 1,
82  TOOL_ADDDIR_ID = 2,
84  TOOL_REMOVE_ID = 4,
86  TOOL_HELP_ID = 6,
87  TOOL_SETTINGS_ID = 7,
88  TOOL_TOOLS_ID = 8,
89  TOOL_CREATEDB_ID = 9,
90  TOOL_PACS_ID = 10
91  };
Enumerator
Icon_create_database 
Icon_accept 
Icon_add 
Icon_folder_down 
Icon_page_down 
Icon_database_add 
Icon_remove 
Icon_synchronize 
Icon_help 
Icon_settings 
Icon_tools 

Definition at line 98 of file creaImageIOWxGimmickView.cpp.

99  {
101  Icon_accept,
102  Icon_add,
106  Icon_remove,
108  Icon_help,
110  Icon_tools
111  }

Function Documentation

void creaImageIO::deleteGimmickDebugMessage ( )
inline

Definition at line 76 of file creaImageIOSystem.h.

77  {
78  delete crea::MessageManager::GetInstance();
79  }
char* creaImageIO::format_sql ( const std::string &  s)

Definition at line 218 of file creaImageIOSQLiteTreeHandler.cpp.

219  {
220  return sqlite3_mprintf("%q",s.c_str());
221  }
std::vector<boost::any>& creaImageIO::getAnyImages ( )

Definition at line 80 of file creaImageIOWxIsimpleDlg.h.

References m_AnyImages.

80 { return m_AnyImages;}
std::vector<typename TImage::Pointer> creaImageIO::getImagesSelected ( )

return a itkImage vector of selected images, if available

wxString creaImageIO::getInfoImage ( )
std::vector<vtkImageData*> creaImageIO::getVtkImagesSelected ( )

return a vtkImageData vector of selected images, if available

Definition at line 69 of file creaImageIOWxIsimpleDlg.h.

References m_Vresults.

69 {return m_Vresults;}
std::string creaImageIO::irclean ( const std::string &  str)

Definition at line 110 of file creaImageIODicomImageReader.cpp.

Referenced by creaImageIO::DicomImageReader::ReadAttributes(), and creaImageIO::DicomImageReader::ReadAttributes2().

111  {
112  if(str.size() > 0)
113  {
114  if (str == "GDCM::Unfound")
115  {
116  return "";
117  }
118  if (str[str.size()-1]==' ')
119  {
120  return irclean(str.substr(0,str.size()-1));
121  }
122  if (str[str.size()-1]==0)
123  {
124  return irclean(str.substr(0,str.size()-1));
125  }
126  }
127 
128  return str;
129  }

Here is the caller graph for this function:

void creaImageIO::OnReadDirectory ( wxCommandEvent &  event)

Callback to read directory, no recursive.

void creaImageIO::OnReadFile ( wxCommandEvent &  event)

Callback to read file(s)

void creaImageIO::OnReadGimmick ( wxCommandEvent &  event)

Callback to select from creaImageIO database.

template<class T , class CT , class IT >
std::ostream& creaImageIO::operator<< ( std::ostream &  s,
const IndexedHeap< T, CT, IT > &  t 
)

Definition at line 38 of file creaImageIOIndexedHeap.h.

41 {
42 
43 
44 
template<class T , class C , class I >
std::ostream& creaImageIO::operator<< ( std::ostream &  ,
const IndexedHeap< T, C, I > &   
)
void creaImageIO::readDicomImg ( const std::vector< std::string > &  i_names)
private
bool creaImageIO::ReadHeader ( FILE *  Ultrasonix_file,
Ultrasonix_header &  h 
)

Definition at line 69 of file creaImageIOUltrasonixImageReader.cpp.

References creaImageIO::Ultrasonix_header::frame, creaImageIO::Ultrasonix_header::frequency, HEADER_SIZE, creaImageIO::Ultrasonix_header::height, creaImageIO::Ultrasonix_header::samplingRate, creaImageIO::Ultrasonix_header::type, and creaImageIO::Ultrasonix_header::width.

Referenced by creaImageIO::UltrasonixImageReader::CanRead(), creaImageIO::UltrasonixImageReader::ReadAttributes(), and creaImageIO::UltrasonixImageReader::ReadImage().

70  {
71  //int *header=(int*)malloc(sizeof(int)*HEADER_SIZE);
72  int header[HEADER_SIZE];
73  fread(header, sizeof(int), HEADER_SIZE, Ultrasonix_file);
74  if (ferror(Ultrasonix_file))
75  return false;
76  h.type = header[1];
77  h.frame = header[2];
78  h.height = header[3];
79  h.width = header[4];
80  h.frequency = header[14];
81  h.samplingRate = header[15];
82  //free(header);
83  return true;
84  }

Here is the caller graph for this function:

void creaImageIO::readImg ( const std::string &  i_name)
private
void creaImageIO::RegisterGimmickMessageTypes ( )
inline

Definition at line 50 of file creaImageIOSystem.h.

Referenced by creaImageIO::Gimmick::Gimmick(), SetGimmickDebugMessageLevel(), and SetGimmickMessageLevel().

51  {
52  static bool first_time = true;
53  if (first_time)
54  {
55  crea::MessageManager::RegisterMessageType("Gimmick!",
56  "Gimmick",1);
57  crea::MessageManager::RegisterMessageType("Gimmick! DEBUG",
58  "Gimmick",0);
59  first_time = false;
60  }
61  }

Here is the caller graph for this function:

void creaImageIO::set ( bool  i_dicom)

Definition at line 79 of file creaImageIOWxIsimpleDlg.h.

References m_dicom.

79 {m_dicom= i_dicom;}
void creaImageIO::setExts ( std::vector< std::string >  )
void creaImageIO::SetGimmickDebugMessageLevel ( int  l)
inline

Definition at line 69 of file creaImageIOSystem.h.

References RegisterGimmickMessageTypes().

Referenced by myApp::OnInit(), and creaImageIO::Gimmick::SetDebugMessageLevel().

70  {
72  crea::MessageManager::SetMessageLevel("Gimmick! DEBUG",l);
73  }

Here is the call graph for this function:

Here is the caller graph for this function:

void creaImageIO::SetGimmickMessageLevel ( int  l)
inline

Definition at line 63 of file creaImageIOSystem.h.

References RegisterGimmickMessageTypes().

Referenced by myApp::OnInit(), and creaImageIO::Gimmick::SetMessageLevel().

64  {
66  crea::MessageManager::SetMessageLevel("Gimmick!",l);
67  }

Here is the call graph for this function:

Here is the caller graph for this function:

void creaImageIO::split3Din3Dvtk ( )
void creaImageIO::split4Din3Dvtk ( const std::string &  i_dir)
void creaImageIO::SplitExtensionsString ( const std::string &  str,
const std::string &  delimiters,
std::vector< std::string > &  tokens 
)

Definition at line 162 of file creaImageIOVtkImageReader.cpp.

Referenced by creaImageIO::VtkImageReader::PushBackExtensions().

165  {
166  // Skip delimiters at beginning.
167  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
168  // Find first delimiter.
169  std::string::size_type pos = str.find_first_of(delimiters, lastPos);
170 
171  while (std::string::npos != pos || std::string::npos != lastPos)
172  {
173  // Found a token, add it to the vector.
174  // SPECIFIC : REMOVE INITIAL DOT (lastPos + 1)
175  tokens.push_back(str.substr(lastPos+1, pos - lastPos));
176  // Skip delimiters. Note the "not_of"
177  lastPos = str.find_first_not_of(delimiters, pos);
178  // Find next delimiter
179  pos = str.find_first_of(delimiters, lastPos);
180  }
181 
182  }

Here is the caller graph for this function:

void creaImageIO::SQLformat ( std::string  i_str,
std::string &  o_str 
)

Definition at line 568 of file creaImageIOSQLiteTreeHandler.cpp.

Referenced by creaImageIO::SQLiteTreeHandler::SQLAppendAttributesValues().

569  {
570  // quote must be doubled
571  boost::algorithm::replace_all(i_str,"'","''");
572  // Found strange strings which contained NULL char INSIDE string
573  int i,size=(int)i_str.size();
574  for (i=0;i<size;++i)
575  {
576  if (i_str[i]==0)
577  {
578  i_str = i_str.substr(0,i);
579  break;
580  }
581  }
582  o_str = i_str;
583  }

Here is the caller graph for this function:

Variable Documentation

const int creaImageIO::icon_number = 11
wxString creaImageIO::infoimage

Definition at line 87 of file creaImageIOWxIsimpleDlg.h.

std::vector<boost::any> creaImageIO::m_AnyImages
bool creaImageIO::m_dicom

Definition at line 88 of file creaImageIOWxIsimpleDlg.h.

Referenced by creaImageIO::WxAnySimpleDlg::set(), and set().

std::vector<std::string> creaImageIO::m_exts

Definition at line 84 of file creaImageIOWxIsimpleDlg.h.

std::vector<typename TImage::Pointer> creaImageIO::m_Iresults

Definition at line 94 of file creaImageIOWxIsimpleDlg.h.

SimpleView creaImageIO::m_view

interface to read data

Definition at line 90 of file creaImageIOWxIsimpleDlg.h.

std::vector<vtkImageData*> creaImageIO::m_Vresults
std::string creaImageIO::namedb

Definition at line 86 of file creaImageIOWxIsimpleDlg.h.

std::string creaImageIO::namedescp

Definition at line 85 of file creaImageIOWxIsimpleDlg.h.