//=====================================================================
bool DicomImageReader::CanRead(const std::string& filename)
{
-
- GDCM_NAME_SPACE::Document*doc;
+ GDCM_NAME_SPACE::Document*doc;
GDCM_NAME_SPACE::File* file = GDCM_NAME_SPACE::File::New();
file->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
file->SetFileName(filename.c_str());
//=====================================================================
vtkImageData* DicomImageReader::ReadImage(const std::string& filename)
{
-
vtkImageData* im = 0;
try
{
}
return im;
}
-
+
//=====================================================================
void DicomImageReader::PushBackExtensions(std::vector<std::string>& v)
{
{
return str.substr(0,str.size()-1);
}
-
return str;
}
//========================================================================
void DicomImageReader::ReadAttributes(const std::string& filename,
std::map<std::string,std::string>& attr)
{
-
GimmickMessage(2,"Reading attributes from DICOM file '"
<<filename<<"'"<<std::endl);
-
- GDCM_NAME_SPACE::File* file = GDCM_NAME_SPACE::File::New();
- GDCM_NAME_SPACE::Document *doc= GDCM_NAME_SPACE::File::New();
- doc->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
+ GDCM_NAME_SPACE::File* file = GDCM_NAME_SPACE::File::New();
+
+ GDCM_NAME_SPACE::Document *doc= GDCM_NAME_SPACE::File::New();
+ doc->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
doc->SetFileName(filename.c_str());
doc->Load();
file->SetLoadMode( GDCM_NAME_SPACE::LD_ALL);
file->Load();
if (file->IsReadable() ||((GDCM_NAME_SPACE::Document*) file)->IsReadable())
{
-
std::map<std::string,std::string>::iterator i;
for (i=attr.begin();i!=attr.end();++i)
{
}
file->Delete();
}
-
+
//=====================================================================
} // namespace creaImageIO
out << mImageExtent->GetDimension() << "D image " << mImageExtent->Get(0) << "x"<< mImageExtent->Get(1) << "x"<< mImageExtent->Get(2) <<" selected";
mMessage = out.str();
}
-
}
else
{
mMessage="The selected images are not compatible.";
valid=false;
}
- }
+ }
}
-
modifyValidationSignal(valid);
SetMessage(mMessage);
return valid;
mValidationSignal(ivalid);
}
-
//======================================================================
///Reads Images (Non Threaded)
-void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vector<std::string> im, int dimension)
+void GimmickView::ReadImagesNotThreaded(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
{
-
// Create the output data
if (im.size()==1)
{
out->ShallowCopy(mReader.GetImage(im.front()));
s.push_back( out );
}
- else if (im.size()>1)
+ else if (im.size()>1) // Test inutile ? JPR
{
vtkImageData* first = mReader.GetImage( im.front());
if (dimension == 2)
{
// n3D
- std::vector<std::string>::iterator it;
+ std::vector<std::string>::iterator it;
for (it=im.begin(); it!=im.end(); ++it)
{
vtkImageData* out = vtkImageData::New();
out->SetScalarType(first->GetScalarType());
int ext[6];
first->GetExtent(ext);
- ext[5] = im.size()-1;
+ //ext[5] = im.size()-1; // JPR
+ ext[5] = ext[5] * im.size()-1; // deal with multiframes //JPR
out->SetExtent(ext);
// LG : TODO : Z Spacing ?
int dim[3];
first->GetDimensions(dim);
- unsigned long imsize = dim[0] * dim[1];/*
+ unsigned long imsize = dim[0] * dim[1];
+ imsize = imsize * dim[2] ; // deal with multiframes// JPR
+
+ /*
( (unsigned long)first->GetScalarPointer(0,1,0)
- (unsigned long)first->GetScalarPointer(0,0,0))
*dim[1];*/
int slice = 0;
std::vector<std::string>::iterator it;
for (it=im.begin(); it!=im.end(); ++it)
- {
+ {
//std::cout << "copying slice "<<slice <<std::endl;
- vtkImageData* cur = mReader.GetImage( (*it));
+ vtkImageData* cur = mReader.GetImage( (*it));
void* src = cur->GetScalarPointer(0,0,0);
void* dst = out->GetScalarPointer(0,0,slice);
memcpy(dst,src,imsize);
slice++;
- }
+ }
s.push_back(out);
-
}
- }
+ }
+}
+ //======================================================================
+
+void GimmickView::ReadImagesNotThreadedInVector(std::vector<vtkImageData*>& s, std::vector<std::string> im, int dimension)
+{
+ // Create the output data
+ if (im.size()==1)
+ {
+ // Only one image : give it
+ vtkImageData* out = vtkImageData::New();
+ GimmickDebugMessage(3, "State Check: Full Filename: "
+ <<im.front()
+ <<std::endl);
+ out->ShallowCopy(mReader.GetImage(im.front()));
+ s.push_back( out );
+ }
+ else if (im.size()>1) // Test inutile ? JPR
+ {
+ vtkImageData* first = mReader.GetImage( im.front());
+ if (dimension == 2)
+ {
+ // n3D
+ std::vector<std::string>::iterator it;
+ for (it=im.begin(); it!=im.end(); ++it)
+ {
+ vtkImageData* out = vtkImageData::New();
+ out->ShallowCopy(mReader.GetImage(*it));
+ s.push_back(out);
+ }
+ }
+ else
+ {
+ // n2D to 3D // NO!
+ // n *2D + T in a vector :
+
+ std::vector<std::string>::iterator it;
+ for (it=im.begin(); it!=im.end(); ++it)
+ {
+ vtkImageData* out = mReader.GetImage( (*it));
+ s.push_back(out);
+ }
+ }
+ }
}
//======================================================================
{
//What to do in this case?
/*
- GimmickDebugMessage(5,
+ GimmickDebugMessage(5,
"Pushing unknown image in queue"
<<std::endl);
- mImageEventQueue.push_back(ImageEventType(image));*/
+ mImageEventQueue.push_back(ImageEventType(image));*/
return;
}
ImageEventTypeMap::iterator i;
if (i!=mImageEventMap.end())
{
GimmickDebugMessage(5,
- "Putting image of file '"<<filename<<"' on pointer"
- <<std::endl);
+ "Putting image of file '"<<filename<<"' on pointer"
+ <<std::endl);
ImageEventType ie(i->second);
ie.image = image;
ie.pointerHolder->Set(ie.image);
ie.pointerHolder->Set(GetDefaultImage());
//mImageEventMap.erase(i);
}
-
}
}
void GimmickView::ConnectValidationObserver(ValidationCallbackType callback)
{
mValidationSignal.connect(callback);
- }
-
+ }
} // EO namespace creaImageIO
-
#define GIMMICK_4D_IMAGE_SELECTION 4
#define NATIVE 0
-#define _2D 2
-#define _3D 3
-
+#define _2D 2
+#define _3D 3
namespace creaImageIO
{
/// Finalize
virtual void Finalize();
- //Returns the maximal priority
- int GetMaximalPriority(){return mReader.GetMaximalPriority();}
+ ///Returns the maximal priority
+ int GetMaximalPriority(){return mReader.GetMaximalPriority();}
+
+ ///Adds the selected Images to the given vector
+ virtual void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
+ { GimmickError("INTERNAL ERROR : GetSelectedImagesInVector not implemented"); }
///Adds the selected Images to the given vector and validates to see if they comply with the given parameter (4D)
virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
virtual void SaveAs(const std::vector<std::string>& filenames)
{ GimmickError("INTERNAL ERROR : SaveAs not implemented"); }
-
/// No selected image
bool NoValidateSelected();
+
///Validates the dimension compliance of the images with the maximum and minimum given, and between their sizes
bool ValidateSelected (tree::Node* sel, int min_dim, int max_dim);
-
+
///Reads the vector of images, builds it in the dimension required and returns them in the supplied vector.
void ReadImagesNotThreaded(std::vector<vtkImageData*>& s,std::vector<std::string> files, int dim);
- ///Requests the reading of an image with priority and index in the
+
+ ///Reads the vector of images, builds it in the dimension required and returns them in the supplied vector.
+ void ReadImagesNotThreadedInVector(std::vector<vtkImageData*>& s,std::vector<std::string> files, int dim);
+
+///Requests the reading of an image with priority and index in the
/// current selection (-1 if not in selection)
//void RequestReading(tree::Node* n, int prio, int selection_index , ImagePointerHolder *p);
void RequestReading(tree::Node* n, int prio, int selection_index , boost::shared_ptr<ImagePointerHolder> p);
-
-
+
///Obtains the message of the state
std::string GetMessage(){return mMess;}
- ///Obtains the message of the state
+
+ ///Obtains the message of the state
void SetMessage(std::string mess){mMess=mess;}
+
///Resets the data of the extent and begins a new selection
void ResetExtent();
/// Updates the TreeView of given name from level l to bottom
/// (calls the virtual method TreeView::UpdateLevel(l))
virtual void UpdateTreeViewLevel(const std::string&, int l);
+
// Multi-thread image reader callback
void OnMultiThreadImageReaderEvent(const std::string& filename,
MultiThreadImageReaderUser::EventType t,
vtkImageData* GetDefaultImage() { return mReader.GetImage(""); }
-
//=============================================
typedef boost::signal<void (bool)> ValidationSignalType;
typedef ValidationSignalType::slot_function_type ValidationCallbackType;
void ConnectValidationObserver(ValidationCallbackType callback);
//==================================================================
-
-
void modifyValidationSignal(bool ivalid);
private:
-
+
/// Controller which manages the interaction with the model
- boost::shared_ptr< Gimmick> mGimmick;
+ boost::shared_ptr< Gimmick> mGimmick;
+
/// The views
TreeViewMapType mTreeViewMap;
+
/// The message that results from the validation
std::string mMess;
/// Multi-thread image reader
MultiThreadImageReader mReader;
+
/// Internal type of image reading event
/// If the image pointer is non null then the image is available (loaded)
/// else it has been unloaded
ImageEventType( tree::Node* no = 0,
int sel_index = -1)
// ImagePointerHolder* ph= 0)
-: node(no), index(sel_index){}//, pointerHolder(ph){}
+ : node(no), index(sel_index){}//, pointerHolder(ph){}
ImageEventType(vtkImageData* im )
: image(im) {}
tree::Node* node;
/// Map of images' names to ImageEventType
/// Used to associated a filename to a the data of a request
ImageEventTypeMap mImageEventMap;
+
// queue of image event
typedef std::deque<ImageEventType> ImageEventQueueType;
+
//ImageEventQueueType mImageEventQueue;
///The current image extent
boost::shared_ptr<ImageExtent> mImageExtent;
+
///The validation signal
ValidationSignalType mValidationSignal;
+
///Boolean that determines if the selection is valid
bool valid;
+
///Boolean that determines if the reader has been started
bool mReaderStarted;
-
+
};
// EO class GimmickView
//=====================================================================
-
-
} // EO namespace creaImageIO
// EOF
#include <wx/utils.h>
#include <creaImageIOSystem.h>
-
namespace creaImageIO
{
};
-
//=====================================================================
boost::shared_ptr<ThreadedImageReader> t(new ThreadedImageReader(this), ThreadedImageReader::deleter());
mThreadedImageReaderList.push_back(t);
std::cout << " ===> Thread "<<i
- <<" successfully added"<< std::endl;
+ <<" successfully added"<< std::endl;
}
mNumberOfThreadedReadersRunning = 0;
// Init the queue
int priority )
{
wxMutexLocker lock(GetMultiThreadImageReaderUserMutex()); //mMutex);
-
+
if (mNumberOfThreadedReadersRunning==0)
// if (mThreadedImageReaderList.size()==0)
{
return;
}
-
ImageToLoad itl(user,filename);
ImageMapType::iterator i = mImages.find(&itl);
if (i!=mImages.end())
GimmickMessage(5," ==> Total mem = "<<mTotalMem<<" Ko "<<std::endl);
-
if (user!=0)
{
// std::cout << "unlock..."<<std::endl;
MultiThreadImageReaderUser::ImageUnloaded,
0);
// std::cout << "event ok"<<std::endl;
-
}
if (unload->Index()>=0)
// std::cout << "delete ok."<<std::endl;
}
-
-
}
//=====================================================================
const unsigned int AttributeDescriptor::PRIVATE = 1;
/// The attribute enters in unique identifier constitution
const unsigned int AttributeDescriptor::IDENTIFIER = 2;
- /// The attribute can be edited
- const unsigned int AttributeDescriptor::EDITABLE = 3;
- /// the attribute describes the node
+ /// The attribute can be edited
+ const unsigned int AttributeDescriptor::EDITABLE = 3;
+ /// the attribute describes the node
const unsigned int AttributeDescriptor::LABEL = 4;
//==================================================================
// Patient level
Add(LevelDescriptor("Patient"));
- Add(AttributeDescriptor("NumberOfChildren","#Series",0),1); // Number of Series
+ Add(AttributeDescriptor("NumberOfChildren","#Series",0),1); // Number of Series
Add(AttributeDescriptor(0x0010,0x0010, // Patient name
AttributeDescriptor::LABEL),1);
Add(AttributeDescriptor(0x0010,0x0040),1); // Patient sex
Add(AttributeDescriptor(0x0010,0x0030),1); // Patient birthday
Add(AttributeDescriptor(0x0010,0x0020, // Patient ID
AttributeDescriptor::IDENTIFIER),1);
-
+
// Study-series level
Add(LevelDescriptor("Series"));
- Add(AttributeDescriptor("NumberOfChildren","#Images",0),2); // Number of images
+ Add(AttributeDescriptor("NumberOfChildren","#Images",0),2); // Number of images
Add(AttributeDescriptor(0x0008,0x0060, // Modality
AttributeDescriptor::LABEL),2);
Add(AttributeDescriptor(0x0008,0x1030),2); // Study Description
Add(AttributeDescriptor(0x0008,0x103E),2); // Description
Add(AttributeDescriptor(0x0008,0x0080),2); // Institution Name
Add(AttributeDescriptor(0x0008,0x0081),2); // Institution Adress
- Add(AttributeDescriptor(0x0008,0x1010),2); // Station Name
+ Add(AttributeDescriptor(0x0008,0x1010),2); // Station Name
Add(AttributeDescriptor(0x0008,0x1048),2); // Physician of Record
Add(AttributeDescriptor(0x0008,0x1050),2); // Performing Physician's Name
Add(AttributeDescriptor(0x0018,0x1030),2); // Protocol Name
Add(AttributeDescriptor(0x0020,0x000D // Study Instance UID
),2);//AttributeDescriptor::IDENTIFIER),2);
Add(AttributeDescriptor(0x0020,0x000E, // Series Instance UID
- AttributeDescriptor::IDENTIFIER),2);
+ AttributeDescriptor::IDENTIFIER),2);
// |
- // AttributeDescriptor::LABEL),2);
+ // AttributeDescriptor::LABEL),2);
// Image level
Add(AttributeDescriptor(0x0020,0x4000),3); // Image Comments
Add(AttributeDescriptor(0x0004,0x1500, // File Name
- AttributeDescriptor::LABEL),3);
+ AttributeDescriptor::LABEL),3);
Add(AttributeDescriptor(0x0028,0x1052),3); // Rescale Intercept
Add(AttributeDescriptor(0x0028,0x1053),3); // Rescale Slope
Add(AttributeDescriptor(0x0050,0x0004),3); // Calibration Image
Add(AttributeDescriptor(0x0020,0x0052 // Frame Reference UID
- ),3);
+ ),3);
Add(AttributeDescriptor(0x0008,0x0016),3); // SOP Class UID
Add(AttributeDescriptor("FullFileName", // Full file name
- "Full file name",
- AttributeDescriptor::IDENTIFIER),3);
-
-
+ "Full file name",
+ AttributeDescriptor::IDENTIFIER),3);
+
}
//////////////////////////////////////////////////////////////
// create a descriptor (name, attributes...) from a file) //
- // @param : file path //
- // return : - //
+ // @param : file path //
+ // return : - //
//////////////////////////////////////////////////////////////
void Descriptor::createDescriptorfromFile(const std::string &i_name)
{
else if(descriptors[0].find("#") != -1)
{
- // commented line continue to next line
+ // commented line continue to next line
}
else
{ boost::algorithm::replace_all(descriptors[2],"_"," ");
}
}
-
//==================================================================
//==================================================================
{
mLevelDescriptorList.clear();
}
+
//==================================================================
//==================================================================
}
}
}
-
}
}
mView->GetSelectedImages(s, dim);
}
+ void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
+ {
+ mView->GetSelectedImagesInVector(s, dim);
+ }
+
void OnSelectedImage(bool t);
void AddImagesToDB(std::string dir);
const wxPoint& pos,
const wxSize& size,
int min_dim,
- int max_dim,
- int output_dim,
+ int max_dim,
+ int output_dim,
int threads)
: wxDialog( parent,
id,
}
if (mGimmick)
{
- mGimmick->Finalize();
- //mGimmick->Finalize();
-// delete mGimmick;
+ mGimmick->Finalize();
+ //delete mGimmick;
}
-
}
///Callback method on a selection
{
mOkButton->Enable(t);
}
-
-
-
//================================================================
//BEGIN_EVENT_TABLE(WxGimmickReaderDialog, wxDialog)
~WxGimmickReaderDialog();
-
//===============================================================================================
//Image Selection
//===============================================================================================
void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
{ mView->GetSelectedImages(s, dim); }
+ void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
+ { mView->GetSelectedImagesInVector(s, dim); }
void GetSelectedFiles(std::vector<std::string>& s)
{ mView->GetSelectedFiles(s); }
-
+
void OnSelChanged(EventType& event);
void OnContextualMenu(EventType& event);
void OnMenuTest(wxCommandEvent& event);
// void OnButtonCancel(wxCommandEvent& event);
private :
-
+
boost::shared_ptr<Gimmick> mGimmick;
WxGimmickView* mView;
wxButton* mOkButton;
wxButton* mCancelButton;
-
enum
{
TOOL_SETTINGS_ID = 7,
TOOL_TOOLS_ID = 8,
TOOL_CREATEDB_ID = 9,
- TOOL_PACS_ID = 10
+ TOOL_PACS_ID = 10
};
//======================================================================
// Create the tool bar
CreateToolBar();
- sizer->Add( mToolBar ,0, wxGROW ,0);
+ sizer->Add( mToolBar, 0, wxGROW, 0);
// Split part below toolbar into notebook for views and panel
// for preview, messages...
mSplitter = new wxSplitterWindow( this , -1);
-
-
+
// Notebook
mNotebook = new wxNotebook(mSplitter,
- -1,wxDefaultPosition, wxDefaultSize, 0);
+ -1, wxDefaultPosition, wxDefaultSize, 0);
//Gimmick
mGimmick=gimmick;
-
- mSelectionMaxDimension= max_dim;
- mSelectionMinDimension= min_dim;
+ mSelectionMaxDimension = max_dim;
+ mSelectionMinDimension = min_dim;
// Create the views
CreateTreeViews();
mSplitter->SplitHorizontally( mNotebook, mBottomPanel,
top_minsize);
- sizer->Add( mSplitter,1,wxGROW ,0);
+ sizer->Add( mSplitter, 1, wxGROW, 0);
mProgressDialog=0;
SetSizer( sizer );
SetAutoLayout(true);
Layout();
mListener=new Listener();
- mListener->ConnectObserver(boost::bind( &WxGimmickView::OnDriveMount , this, _1 ) );
+ mListener->ConnectObserver(boost::bind( &WxGimmickView::OnDriveMount, this, _1 ) );
mListener->Create();
mListener->Run();
mListener->Pause();
GimmickMessage(2,"Creating the tree view for '"<<
name<<"'"<<std::endl);
// Create the WxTreeView
- WxTreeView* view = new WxTreeView(h,this,mNotebook,-1);
+ WxTreeView* view = new WxTreeView(h, this, mNotebook, -1);
// TO DO : TEST THAT A VIEW WITH SAME NAME IS NOT
// ALREADY IN THE MAP
{
std::vector<std::string> files;
GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files);
- ReadImagesNotThreaded(s,files,dim);
+ ReadImagesNotThreaded(s, files, dim);
+ }
+
+ //======================================================================
+ void WxGimmickView::GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
+ {
+ std::vector<std::string> files;
+ GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files);
+ ReadImagesNotThreadedInVector(s, files, dim);
}
//======================================================================
wxIcon icons[20];
// should correspond to Icon_xxx enum
- icons[Icon_accept] = wxIcon(accept_xpm);
- icons[Icon_add] = wxIcon(add_xpm);
- icons[Icon_folder_down] = wxIcon(folder_down_xpm);
- icons[Icon_page_down] = wxIcon(page_down_xpm);
- icons[Icon_remove] = wxIcon(remove_xpm);
- icons[Icon_database_add] = wxIcon(database_add_xpm);
- icons[Icon_help] = wxIcon(help_xpm);
- icons[Icon_synchronize] = wxIcon(synchronize_xpm);
+ icons[Icon_accept] = wxIcon(accept_xpm);
+ icons[Icon_add] = wxIcon(add_xpm);
+ icons[Icon_folder_down] = wxIcon(folder_down_xpm);
+ icons[Icon_page_down] = wxIcon(page_down_xpm);
+ icons[Icon_remove] = wxIcon(remove_xpm);
+ icons[Icon_database_add] = wxIcon(database_add_xpm);
+ icons[Icon_help] = wxIcon(help_xpm);
+ icons[Icon_synchronize] = wxIcon(synchronize_xpm);
icons[Icon_create_database] = wxIcon(create_database_xpm);
- icons[Icon_settings] = wxIcon(settings_xpm);
- icons[Icon_tools] = wxIcon(tools_xpm);
+ icons[Icon_settings] = wxIcon(settings_xpm);
+ icons[Icon_tools] = wxIcon(tools_xpm);
// unsigned int NbIcons = 8;
// Make an image list containing small icons
1000,
this,
wxPD_ELAPSED_TIME |
- // wxPD_ESTIMATED_TIME |
- // wxPD_REMAINING_TIME |
+ // wxPD_ESTIMATED_TIME |
+ // wxPD_REMAINING_TIME |
wxPD_CAN_ABORT );
// TO DO : select the current tree handler
if (FD->ShowModal()==wxID_OK)
{
-
-
std::string dirname = wx2std (FD->GetPath());
bool recurse = isNeedRecursive(dirname);
if (recurse)
{
- recurse = wxMessageBox(_T("Recurse into sub-directories ?"), _T("Scan directory"), wxYES_NO,this ) == wxYES ? true : false;
+ recurse = wxMessageBox(_T("Recurse into sub-directories ?"), _T("Scan directory"), wxYES_NO,this ) == wxYES ? true : false;
}
-
+
wxBusyCursor busy;
wxString title(_T("Adding directory"));
if (recurse)
this,
wxPD_ELAPSED_TIME |
wxPD_SMOOTH |
- // wxPD_ESTIMATED_TIME |
- // wxPD_REMAINING_TIME |
+ // wxPD_ESTIMATED_TIME |
+ // wxPD_REMAINING_TIME |
wxPD_CAN_ABORT );
-
+
mCurrentDirectory = FD->GetPath();
mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),dirname,recurse);
mProgressDialog->Pulse(_T("Updating view..."));
-
+
UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1);
delete mProgressDialog;
DisplayAddSummary();
-
}
mViewer->StartPlayer();
}
- //=================================================
+ //=================================================
// Determines number of files potentially to add to database
int WxGimmickView::NumberFilesToAdd(const std::string &dirpath, bool recursive)
{
}
}
return nb;
-
}
- //=================================================
+ //=================================================
// Test a directory to know if contains sub-directory to analyze
bool WxGimmickView::isNeedRecursive(std::string i_name)
{
ClearSelection();
}*/
ReadImageThreaded(sel);
-
-
}
//==================================================
mViewer->RefreshIfNecessary();
ResetExtent();
}
-
+
//=================================================
//=================================================
}
//=================================================
-
+
//=================================================
void WxGimmickView::AddIgnoreFile(tree::Node* toRemove)
{
dial->SetSizer(siz);
dial->ShowModal();
}
+
//=================================================
void WxGimmickView::OnImportExport(wxCommandEvent &Event)
{
}
}
}
-
else
{
wxMessageBox(_T("One or both of the directory fields are empty"),_T("Empty Fields"),wxOK,this);
delete gimmickTools;
#endif
}
-
mViewer->StartPlayer();
}
+
//=================================================
void WxGimmickView::CreateSettingsDialog(wxNotebook* nb, wxDialog* dial)
} // EO namespace creaImageIO
-
typedef int EventType;
/// Ctor
- WxGimmickView(boost::shared_ptr<Gimmick> ,
+ WxGimmickView(boost::shared_ptr<Gimmick>,
wxWindow *parent,
const wxWindowID id,
const wxPoint& pos, const wxSize& size,
/// Returns the selected Images so that they comply with the
/// given parameter(4D) (overloaded from GimmickView)
void GetSelectedImages(std::vector<vtkImageData*>& s, int dim);
+ void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim);
/// Returns the images indicated by the filenames in the vector
/// so that they comply with the given parameter(dim)
boost::shared_ptr<Gimmick> mGimmick;
Listener* mListener;
+
/// Callback for adding files
void OnAddFiles(wxCommandEvent& event);
+
/// Callback for adding dir
void OnAddDir(wxCommandEvent& event);
+
/// Callback for removing files
void OnRemove(wxCommandEvent& event);
+
/// Callback for synchronization
void OnSynchronize(wxCommandEvent& event);
+
/// Callback for settings edition
void OnSettings(wxCommandEvent& event);
+
/// Callback for settings edition
void OnTools(wxCommandEvent& event);
+
/// Callback for Import/Export images
void OnImportExport(wxCommandEvent& event);
/// Progress dialog
wxProgressDialog* mProgressDialog;
+
///The selection's maximum dimension
int mSelectionMaxDimension;
+
///The selection's minimum dimension
int mSelectionMinDimension;
+
///Image previewer
WxViewer* mViewer;
+
///Currently Displayed Node
tree::Node* mCurImageItemToShow;
+
//Pointer holders for images to be shown
std::vector< boost::shared_ptr<ImagePointerHolder> > pointers;
-
-
+
wxString mCurrentDirectory;
DECLARE_EVENT_TABLE()
};
// EO class WxGimmickView
//=====================================================================
-
-
-
+
} // EO namespace creaImageIO
#endif // USE_WIDGETS
// EOF
-#endif
+#endif
D 0x0008 0x1030 3
D 0x0008 0x103E 3
D 0x0008 0x0080 3
-D 0x0008 0x0081 3
+#D 0x0008 0x0081 3
#D 0x0008 0x1010 3
#D 0x0008 0x1048 3
#D 0x0008 0x1050 3