Thursday, February 09, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: she
New Today New Today: 15
New Yesterday New Yesterday: 26
User Count Overall: 20578

People Online People Online:
Visitors Visitors: 12
Members Members: 1
Total Total: 13

Online Now Online Now:
01: rlake

ClearCanvas Community Forums

ImportFile Tool Help
Last Post 2010-04-20 10:13 PM by stewart. 1 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
phiungdaihiep
Basic Member
Basic Member
Posts:21

--
2010-04-11 11:31 PM  

Hi all member

i have tried import the image from my Disk to Workstation by source code(using copy of Method:   ClearCanvas.ImageViewer.Services.Tools.DicomFileImportTool.Import() ). the Images are moved to the FileStore location but the Local datastore don't exists that Imported study. so that when i do search on Mystudies, that study not show, is there Any thing wrong. 

 

My Code:

void Import Image()

 

List filenames = LoadFilesName(ImagePath);

  Import(filenames);

}

 

public void Import(List pathList)

        {

            List filePaths = new List();

 

            foreach (string path in pathList)

            {

                filePaths.Add(path);

            }

 

            FileImportRequest request = new FileImportRequest();

            request.FilePaths = filePaths;

            request.BadFileBehaviour = BadFileBehaviour.Ignore;

            request.Recursive = true;

            request.FileImportBehaviour = FileImportBehaviour.Move;

 

            LocalDataStoreServiceClient client = new LocalDataStoreServiceClient();

            try

            {

                client.Open();

                client.Import(request);

                client.Close();

 

                AuditHelper.LogImportStudies(new AuditedInstances(), EventSource.CurrentUser, EventResult.Success);

            }

            catch (EndpointNotFoundException)

            {

                client.Abort();

                //this.Context.DesktopWindow.ShowMessageBox(SR.MessageImportLocalDataStoreServiceNotRunning, MessageBoxActions.Ok);

            }

            catch (Exception e)

            {

                client.Abort();

                //ExceptionHandler.Report(e, SR.MessageFailedToImportSelection, this.Context.DesktopWindow);

            }

        }

 

 

Please help

How can i call Auto-Import a specific Local Directory Images to Workstation.... 

 

 

stewart
Senior Member
Senior Member
Posts:2032

--
2010-04-20 10:13 PM  
Hi, in order to help you, I need a little more information about what you are doing. For example, is this code in a plugin for the Workstation, or in your own separate application? Is the Workstation Shred Host Service running?

Best regards,
Stewart
Real-time support available to Clinical Edition and Team Edition customers
You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.