Re: [Gdcm-hackers] Problem with CStore while trying to store Explicit files in the PACS server.
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mark R. <mm...@gm...> - 2011-02-24 18:05:22
|
Hi Petchirajan,
We're looking into this issue right now.
In the meantime, maybe trying the CompositeNetworkFunctions interface
will help. There are now two Move operations in that interface, one
that reports the result to disk and one that reports the result to
memory.
This interface should allow you to avoid having to manipulate
redundant tags (such as 0x8, 0x52).
Your code would become something like:
std::vector<std::string> theFilenames;
theFileNames.push_back("D:\\MR-MONO2-16-head-Sent.dcm");
bool didItWork = CompositeNetworkFunctions::CStore("192.168.1.34",
11112, theFileNames, "ANY", "DCM4CHEE");
for the first part, and for the second part:
theKeys.push_back(std::make_pair(gdcm::Tag(0x8, 0x18),
"1.2.840.113619.2.1.3352.1015047400.4.3.834485381"));
BaseRootQuery* theQuery =
CompositeNetworkFunctions::ConstructQuery(gdcm::ePatientRootType,
gdcm::EQueryLevel::eImageOrFrame, theKey, true);
std::vector<DataSet> theDataSets =
CompositeNetworkFunctions::CMoveToMemory("192.168.1.34", 11112,
theQuery, 11111, "ANY", "DCM4CHEE");
delete theQuery;
And then you can compare the results of the retrieved data set(s) with
the ones you sent over.
We added this interface over the one you're using to make the process
of using gdcm networking functions easier.
I hope this helps while we look into your specific issue,
Mark
On Sun, Feb 20, 2011 at 9:10 PM, Petchirajan J <pet...@in...> wrote:
>
> Dear All,
>
> I stored the Explicit DICOM file in the DCM4CHEE server using CStore
> functionality. While trying to move that same file from the server to my
> local machine, the file is received as a Implicit file. while trying to read
> that file the tags in the gdcm::DataSet has the invalid VR. I received the
> problem while following the below procedure.
>
> 1. First i store the "MR-MONO2-16-head-Sent.dcm" file to the DCM4CHEE server
> using CStore Functionality.
>
> gdcm::network::ULConnectionManager theManager;
> gdcm::Reader reader;
> reader.SetFileName("D:\\MR-MONO2-16-head-Sent.dcm");
> if(!reader.Read())
> throw gcnew Exception("Can't Read File " + fileNames[0]);
> const gdcm::DataSet &ds = reader.GetFile().GetDataSet();
> if (!theManager.EstablishConnection("ANY", "DCM4CHEE", "192.168.1.34", 0,
> 11112, 1000, gdcm::network::eStore, ds))
> {
> throw gcnew Exception("Failed to establish connection.");
> }
> theManager.SendStore( (gdcm::DataSet*)& amp;ds );
> theManager.BreakConnection(-1);
>
> 2. After that i moved the same file named "MR-MONO2-16-head-Received.dcm" in
> my local system using the CMove Functionality.
>
> std::vector<gdcm::DataSet> theDataSets;
> gdcm::network::ULConnectionManager *theManager = GetConnectionManager();
> gdcm::network::BaseRootQuery* theQuery =
> gdcm::network::QueryFactory::ProduceQuery(gdcm::network::ePatientRootType,
> gdcm::network::EQueryLevel::eImageOrFrame);
> theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x52), "IMAGE");
> //Query/Retrieval Level
> theQuery->SetSearchParameter(gdcm::Tag(0x8, 0x18),
> "1.2.840.113619.2.1.3352.1015047400.4.3.834485381"); //SOP Instance UID
> if (!theManager.EstablishConnectionMove("ANY", "DCM4CHEE", "192.168.1.34",
> 0, 11112, 1000, 11112, theQuery->GetQueryDataSet()))
> {
> throw gcnew Exception("Failed to establish connection.");
> }
> std::vector<gdcm::DataSet> theDataSets = theManager.SendMove( theQuery );
> gdcm:: Writer w;
> w.SetFileName("D:\\MR-MONO2-16-head-Sent.dcm");
> gdcm::File &f = w.GetFile();
> f.SetDataSet(*itor);
> gdcm::FileMetaInformation &fmi = f.GetHeader();
> fmi.SetDataSetTransferSyntax( gdcm::TransferSyntax::ImplicitVRLittleEndian
> );
> w.SetCheckFileMetaInformation( true );
> if (!w.Write())
> {
> throw gcnew Exception("Failed to write");
> }
>
> The DICOM file which i sent to the DCM4CHEE
> server(MR-MONO2-16-head-Sent.dcm) is having the Explicit Transfer Syntax.
> But the received DICOM file from the Server is having the Implicit Transfter
> Syntax. Due to this problem the Value Representation of the all tags are
> unknown in the received file. For your reference i attached the file which i
> sent to the server and the received file and the DataSet of those two files.
>
> In the gdcmULConnectionManager class, while establishing the connection for
> CMove they mention "we do not support explicit Transfer Syntax" in the line
> 105.
>
> 100: gdcm::netw ork::TransferSyntaxSub ts;
> 101: ts.SetNameFromUID(
> gdcm::UIDs::ImplicitVRLittleEndianDefaultTransferSyntaxforDICOM );
> 102: pc.AddTransferSyntax( ts );
> 103: ts.SetNameFromUID( gdcm::UIDs::ExplicitVRLittleEndian );
> 104: //ts.SetNameFromUID(
> gdcm::UIDs::JPEGLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1DefaultTransferSyntaxforLosslessJPEGImageCompression);
> 105: //pc.AddTransferSyntax( ts ); // we do not support explicit (mm)
> 106: switch (inConnectionType){
>
> Is this associated with the problem i mentioned?
> --
> Regards,
> Petchirajan.J
>
> Dear gdcm-hackers ! Get Yourself a cool, short @in.com Email ID now!
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> Gdcm-hackers mailing list
> Gdc...@li...
> https://lists.sourceforge.net/lists/listinfo/gdcm-hackers
>
>
|